/* * Copyright 2014 Donald Ray Crawford Jr. *  * This file is part of Oochis EHR. *  * Oochis EHR is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. *  * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the * GNU General Public License for more details. *  * You should have received a copy of the GNU General Public License * along with Oochis EHR.  If not, see <http://www.gnu.org/licenses/>. */package oochisCore;import java.awt.CardLayout;import java.awt.Color;import java.awt.Component;import java.awt.Cursor;import java.awt.Dimension;import java.awt.Font;import java.awt.Graphics2D;import java.awt.GridBagConstraints;import java.awt.GridBagLayout;import java.awt.Insets;import java.awt.Point;import java.awt.Rectangle;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.FocusEvent;import java.awt.event.FocusListener;import java.awt.event.KeyEvent;import java.awt.event.KeyListener;import java.awt.event.MouseEvent;import java.awt.event.MouseListener;import java.awt.image.BufferedImage;import java.util.Calendar;import java.util.Vector;import javax.swing.ImageIcon;import javax.swing.JButton;import javax.swing.JComponent;import javax.swing.JLabel;import javax.swing.JPanel;import javax.swing.JPopupMenu;import javax.swing.JScrollBar;import javax.swing.JScrollPane;import javax.swing.JSlider;import javax.swing.JSplitPane;import javax.swing.JTextField;import javax.swing.JToggleButton;import javax.swing.SwingConstants;import javax.swing.border.BevelBorder;import javax.swing.border.Border;import javax.swing.border.CompoundBorder;import javax.swing.border.LineBorder;import javax.swing.border.MatteBorder;import javax.swing.plaf.basic.BasicSplitPaneDivider;import javax.swing.plaf.basic.BasicSplitPaneUI;public class PracticeWindow extends Window implements ActionListener, MouseListener, FocusListener, KeyListener {	Dimension practiceLocation = new Dimension(50, 50);	Calendar appointmentsFormCalendar;	String[] dayOfWeek = { "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" };	static String[] month = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" };	String[] aMPM = { "AM", "PM" };	Vector<String> selectedAppointmentProviders = new Vector<String>();	Calendar monthCalendar = Calendar.getInstance();	Calendar weekCalendar = Calendar.getInstance();	Calendar dayCalendar;	Dimension practiceMainButtonsDimension = new Dimension(171, 92);	Dimension appointmentsPaperFormBasePanelScrollPaneBasePanelDimension = new Dimension(1, 240);	Dimension medicalCodeSetScrollPaneDimension = new Dimension(400, 700);	int margin = 8;	JLabel noCodesJLabel = new JLabel("No codes matching query found");	JLabel tooManyCodesJLabel = new JLabel("Too many records match the query, please enter a more constrictive query");	int maxLineInd;	public static BufferedImage screenShot;	CardLayout appointmentsContentPanelScrollPanePanelCardLayout = new CardLayout();	static JPanel appointmentsContentPanelScrollPaneCardedPanelBaseJPanel = new JPanel(new GridBagLayout());	JPanel appointmentsContentPanelScrollPaneCardedJPanel = new JPanel(appointmentsContentPanelScrollPanePanelCardLayout);	JScrollPane appointmentsContentPanelJScrollPane = new JScrollPane(appointmentsContentPanelScrollPaneCardedJPanel);	JScrollBar appointmentsContentPanelHorizontalJScrollbar = new JScrollBar(JScrollBar.HORIZONTAL, 40, 40, 40, 100);	JScrollBar appointmentsContentPanelVerticalJScrollbar = new JScrollBar(JScrollBar.VERTICAL, 40, 40, 40, 100);	static JPanel appointmentsContentJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsFormJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPaperJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPaperFormBaseJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPaperFormBasePanelScrollPaneBaseJPanel = new JPanel(new GridBagLayout());	JScrollPane appointmentsPaperFormBasePanelJScrollPane = new JScrollPane(appointmentsPaperFormBaseJPanel);	double priorAppointmentsSplitPaneProportionalDividerLocation = 1.0;	int appointmentsPaperPanelMargin = 16;	int marginBetweenHorizontalSpacesOfAppointmentFieldsInt = 4;	int marginBetweenVerticalSpacesOfAppointmentFieldsInt = 8;	Insets topLeftInsets = new Insets(0, 0, marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt);	Insets topRowMiddleInsets = new Insets(0, marginBetweenHorizontalSpacesOfAppointmentFieldsInt, marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt);	Insets topRightInsets = new Insets(0, marginBetweenHorizontalSpacesOfAppointmentFieldsInt, marginBetweenVerticalSpacesOfAppointmentFieldsInt, 0);	Insets leftNotTopNorBottomInsets = new Insets(marginBetweenVerticalSpacesOfAppointmentFieldsInt, 0, marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt);	Insets rightNotTopNorBottomInsets = new Insets(marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt, marginBetweenVerticalSpacesOfAppointmentFieldsInt, 0);	Insets bottomLeftInsets = new Insets(marginBetweenVerticalSpacesOfAppointmentFieldsInt, 0, 0, marginBetweenHorizontalSpacesOfAppointmentFieldsInt);	Insets bottomRowMiddleInsets = new Insets(marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt, 0, marginBetweenHorizontalSpacesOfAppointmentFieldsInt);	Insets bottomRightInsets = new Insets(marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt, 0, 0);	Insets middleInsets = new Insets(marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt, marginBetweenVerticalSpacesOfAppointmentFieldsInt, marginBetweenHorizontalSpacesOfAppointmentFieldsInt);	BevelBorder appointmentsPaperFormBasePanelBorder = new BevelBorder(BevelBorder.LOWERED);	static JPanel appointmentsHeaderJPanel = new JPanel(new GridBagLayout());	static Border userInputLineBorder = new MatteBorder(0, 0, 1, 0, Color.BLACK);	static JPanel appointmentsAppointmentProvidorsJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsAppointmentProvidorsJLabel = new JLabel("Providor(s): ");	static JTextField appointmentsAppointmentProvidorsJTextField = new JTextField();	static JPanel appointmentProvidorsPopupMenuJPanel = new JPanel(new GridBagLayout());	JTextField newProvidorGroupNameJTextField = new JTextField(14);	boolean createGroupFromProvidorJToggleButton;	Vector<Vector<Vector<Vector<Object>>>> rootPracticeAppointments;	Vector<Vector<String>> rootPracticeUserGroups;	static JScrollPane appointmentProvidorsPopupMenuJScrollPane = new JScrollPane(appointmentProvidorsPopupMenuJPanel);	static JPopupMenu appointmentProvidorsJPopupMenu = new JPopupMenu();	Vector<String> newProvidorIDGroup = new Vector<String>();	static JPanel appointmentsLengthJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsLengthJLabel = new JLabel("Length: ");	static JTextField appointmentsLengthJTextField = new JTextField();	static JPanel appointmentsPatientGivenNameJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientMiddleInitialOrNameJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientFamilyNameJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientNameSuffixJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientNameDegreeJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientGivenNameJLabel = new JLabel("Given name: ");	static JLabel appointmentsPatientMiddleInitialOrNameJLabel = new JLabel("Middle name: ");	static JLabel appointmentsPatientFamilyNameJLabel = new JLabel("Family name: ");	static JLabel appointmentsPatientNameSuffixJLabel = new JLabel("Suffix: ");	static JLabel appointmentsPatientNameDegreeJLabel = new JLabel("Degree: ");	static JTextField appointmentsPatientGivenNameJTextField = new JTextField();	static JTextField appointmentsPatientMiddleInitialOrNameJTextField = new JTextField();	static JTextField appointmentsPatientFamilyNameJTextField = new JTextField();	static JTextField appointmentsPatientNameSuffixJTextField = new JTextField();	static JTextField appointmentsPatientNameDegreeJTextField = new JTextField();	static JLabel appointmentsChartIDJLabel = new JLabel("Chart ID: ");	static JTextField appointmentsChartIDJTextField = new JTextField("01234");	static JPanel appointmentsPatientPhoneNumberJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientPhoneNumberJLabel = new JLabel("Patient phone: ");	static JTextField appointmentsPatientPhoneNumberJTextField = new JTextField();	static JPanel appointmentsPatientPayorJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientPayorJLabel = new JLabel("Payor: ");	static JTextField appointmentsPatientPayorJTextField = new JTextField();	static JPanel appointmentsPatientPreviousProvidorNameJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientPreviousProvidorNameJLabel = new JLabel("Previous providor name: ");	static JTextField appointmentsPatientPreviousProvidorNameJTextField = new JTextField();	static JPanel appointmentsPatientPreviousProvidorPhoneJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientPreviousProvidorPhoneJLabel = new JLabel("Previous providor phone: ");	static JTextField appointmentsPatientPreviousProvidorPhoneJTextField = new JTextField();	static JPanel appointmentsAppointmentTypeJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsAppointmentTypeJLabel = new JLabel("Type: ");	static JTextField appointmentsAppointmentTypeJTextField = new JTextField();	static JPanel appointmentsPatientEmailJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientEmailJLabel = new JLabel("Email: ");	static JTextField appointmentsPatientEmailJTextField = new JTextField();	static JPanel appointmentsPatientSexJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientSexJLabel = new JLabel("Sex: ");	static JTextField appointmentsPatientSexJTextField = new JTextField();	static JPanel appointmentsPatientSocialSecurityNumberJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientSocialSecurityNumberJLabel = new JLabel("Social security number: ");	static JTextField appointmentsPatientSocialSecurityNumberJTextField = new JTextField();	static JPanel appointmentsPatientCallerCommentsAsChiefComplaintJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientCallerCommentsAsChiefComplaintJLabel = new JLabel("Caller comments: ");	static JTextField appointmentsPatientCallerCommentsAsChiefComplaintJTextField = new JTextField();	static JPanel appointmentsPatientAppointmentDateJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientAppointmentDateJLabel = new JLabel("Date: ");	static JPanel appointmentsPatientAppointmentTimeJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientAppointmentTimeJLabel = new JLabel("Time: ");	Font titledBorderFont = new Font("arial", Font.BOLD, 17);	Border titledBorderLineBorder = new LineBorder(new Color(172, 174, 255), 2);	Color titledBorderColor = new Color(128, 128, 128);	static Color invalidePinkFieldColor = new Color(255, 190, 190);	static int appointmentAppointmentTimeFontSize = 22;	int buttonPanelInset = 3;	int buttonPanelWidth = 12 + 4 * buttonPanelInset;	int dayOfMonthAndYearFieldsAndButtonPanelsInset = 6;	int flatPix = 0;	Dimension appointmentsDayOfWeekTextFieldDimension = new Dimension(128, 24);	Dimension appointmentsComma1AndSpaceTextFieldDimension = new Dimension(17, 24);	Dimension appointmentsMonthTextFieldDimension = new Dimension(121, 24);	Dimension appointmentsDayOfMonthTextFieldDimension = new Dimension(34, 24);	Dimension appointmentsComma2TextFieldDimension = new Dimension(9, 24);	Dimension appointmentsYearTextFieldDimension = new Dimension(68, 24);	Dimension appointmentsHourTextFieldDimension = new Dimension(30, 24);	Dimension appointmentsColonTextFieldDimension = new Dimension(9, 24);	Dimension appointmentsMinuteTextFieldDimension = new Dimension(29, 24);	Dimension appointmentsAmPmTextFieldDimension = new Dimension(38, 24);	Dimension appointmentsPatientAppointmentDateLabelDimension = new Dimension(72, 24);	Dimension appointmentsPatientAppointmentTimeLabelDimension = new Dimension(71, 24);	JTextField appointmentCalendarDayOfWeekJTextField = new JTextField();	JTextField appointmentCalendarComma1AndSpaceJTextField = new JTextField();	JTextField appointmentCalendarMonthJTextField = new JTextField();	JTextField appointmentCalendarDayOfMonthJTextField = new JTextField();	JTextField appointmentCalendarComma2JTextField = new JTextField();	JTextField appointmentCalendarYearJTextField = new JTextField();	JTextField appointmentCalendarHourJTextField = new JTextField();	JTextField appointmentCalendarColonJTextField = new JTextField();	JTextField appointmentCalendarMinuteJTextField = new JTextField();	JTextField appointmentCalendarAmPmJTextField = new JTextField();	static Font appointmentsAmPmTextFieldFontWhenDisplaying24HourTime = new Font("arial", Font.PLAIN, 9);	static JPanel appointmentsPatientAddressStreetOrMailingAddressJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientAddressStreetNameJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientAddressDwellingNumberJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientAddressCityJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientAddressStateOrProvinceJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientAddressZipOrPostalCodeJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsPatientAddressCountryJPanel = new JPanel(new GridBagLayout());	static JLabel appointmentsPatientAddressStreetOrMailingAddressJLabel = new JLabel("Street or mailing address: ");	static JLabel appointmentsPatientAddressStreetNameJLabel = new JLabel("Street name: ");	static JLabel appointmentsPatientAddressDwellingNumberJLabel = new JLabel("Dwelling number: ");	static JLabel appointmentsPatientAddressCityJLabel = new JLabel("City: ");	static JLabel appointmentsPatientAddressStateOrProvinceJLabel = new JLabel("State or province: ");	static JLabel appointmentsPatientAddressZipOrPostalCodeJLabel = new JLabel("Zip or postal code: ");	static JLabel appointmentsPatientAddressCountryJLabel = new JLabel("Country: ");	static JTextField appointmentsPatientAddressStreetOrMailingAddressJTextField = new JTextField();	static JTextField appointmentsPatientAddressStreetNameJTextField = new JTextField();	static JTextField appointmentsPatientAddressDwellingNumberJTextField = new JTextField();	static JTextField appointmentsPatientAddressCityJTextField = new JTextField();	static JTextField appointmentsPatientAddressStateOrProvinceJTextField = new JTextField();	static JTextField appointmentsPatientAddressZipOrPostalCodeJTextField = new JTextField();	static JTextField appointmentsPatientAddressCountryJTextField = new JTextField();	static JPanel appointmentsIncreaseOrDecreaseViewingDateJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsButtonsJPanel = new JPanel(new GridBagLayout());	static JToggleButton appointmentsDayOfMonthViewingOptionJToggleButton = new JToggleButton(" Day ");	static JToggleButton appointmentsWeekViewingOptionJToggleButton = new JToggleButton(" Week ");	static JToggleButton appointmentsMonthViewingOptionJToggleButton = new JToggleButton(" Month ");	static JButton appointmentsNextViewJButton = new JButton(" Next ");	static JButton appointmentsBackViewJButton = new JButton(" Back ");	static JButton appointmentsPrintJButton = new JButton(" Print ");	static JButton appointmentsEmailReminderJButton = new JButton(" Email reminder ");	static JButton appointmentsPhoneReminderJButton = new JButton(" Phone reminder ");	static JButton appointmentsSaveJButton = new JButton(" Save ");	JSlider slider = new JSlider();	Dimension sliderDimension = new Dimension(372, 120);	static JPanel appointmentsDayPanelBaseJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsDayJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsDayPanelPusherJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsWeekJPanel = new JPanel(new GridBagLayout());	JPanel appointmentsMonthJPanel = new JPanel(new GridBagLayout());	JLabel monthCalendarMonthHeaderJLabel = new JLabel();	static JLabel outputNetworkHeaderJLabel = new JLabel("Export network directory: ");	static JTextField outputNetworkJTextfield = new JTextField();	static JButton outputNetworkBrowseJButton = new JButton(" Browse ");	static JLabel addAnOutputDirectoryHeaderJLabel = new JLabel("Export network file name: ");	JLabel exportNetworkDirectoryJLabel = new JLabel("Export network directory: ");	JLabel exportNetworkDirectoryOutputJLabel = new JLabel("HIS/date/encoded/");	JLabel exportNetworkDirectoryOutputPusherJLabel = new JLabel("");	static JTextField addAnOutputDirectoryJTextField = new JTextField();	static JButton addAnOutputDirectoryJButton = new JButton(" Create export file ");	static JPanel outputNetworkPanelScrollPaneJPanel = new JPanel(new GridBagLayout());	JScrollPane outputNetworkJScrollPane = new JScrollPane(outputNetworkPanelScrollPaneJPanel);	static JPanel outputNetworkPanelContentJPanel = new JPanel(new GridBagLayout());	static JPanel outputNetworkJScrollPaneBaseJPanel = new JPanel(new GridBagLayout());	static JLabel inputNetworkHeaderJLabel = new JLabel("Import network directory: ");	static JTextField inputNetworkJTextfield = new JTextField();	static JButton inputNetworkBrowseJButton = new JButton(" Browse ");	static JLabel addAnInputDirectoryHeaderJLabel = new JLabel("Import network file name: ");	static JTextField addAnInputDirectoryJTextField = new JTextField();	static JButton addAnInputDirectoryJButton = new JButton(" Import ");	static JPanel inputNetworkPanelScrollPaneJPanel = new JPanel(new GridBagLayout());	JScrollPane inputNetworkJScrollPane = new JScrollPane(inputNetworkPanelScrollPaneJPanel);	static JPanel inputNetworkPanelContentJPanel = new JPanel(new GridBagLayout());	static JPanel inputNetworkHeaderJPanel = new JPanel(new GridBagLayout());	static JPanel mainCardedBaseJPanel = new JPanel(new GridBagLayout());	static JPanel mainButtonsJPanel = new JPanel(new GridBagLayout());	static JButton patientIndexJButton = new JButton(" Patient index ");	static JButton billingJButton = new JButton(" Network files ");	static JPanel networkFilesJPanel = new JPanel(new GridBagLayout());	static JPanel inputFilesJPanel = new JPanel(new GridBagLayout());	static JButton reportsJButton = new JButton("Reports UNIMPL.");	static JToggleButton recordOfLoginsJToggleButton = new JToggleButton(" Record of logins ");	static JPanel reportsPanelButtonsJPanel = new JPanel(new GridBagLayout());	static JPanel reportsJPanel = new JPanel(new GridBagLayout());	static JButton appointmentsJButton = new JButton();	static JLabel appointmentsButton1JLabel = new JLabel("Appointment");	static JLabel appointmentsButton2JLabel = new JLabel("schedules");	static JButton viewMedicalCodesJButton = new JButton(" View medical codes ");	JPanel mainButtonsPanelBottomLineAndPusherJPanel = new JPanel();	JPanel mainButtonsPaneBottomLineJPanel = new JPanel();	CardLayout mainCardLayout = new CardLayout();	JPanel mainCardedJPanel = new JPanel(mainCardLayout);	static JPanel patientIndexScrollPaneJPanel = new JPanel(new GridBagLayout());	static JScrollPane patientIndexJScrollPane = new JScrollPane(patientIndexScrollPaneJPanel);	static JPanel patientIndexButtonsJPanel = new JPanel(new GridBagLayout());	static JButton patientIndexPrintPageJButton = new JButton(" Print page ");	static JButton patientIndexPrintAllJButton = new JButton(" Print all ");	JPanel patientIndexJPanel = new JPanel(new GridBagLayout());	JPanel inputNetworkFilesJPanel = new JPanel(new GridBagLayout());	JPanel outputNetworkFilesJPanel = new JPanel(new GridBagLayout());	static JPanel outputNetworkHeaderJPanel = new JPanel(new GridBagLayout());	JPanel schedulingJPanel = new JPanel(new GridBagLayout());	static JPanel appointmentsSplitPaneBaseJPanel = new JPanel(new GridBagLayout());	static JSplitPane appointmentsJSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, appointmentsHeaderJPanel, appointmentsContentJPanel);	JPanel providerChoicesJPanel = new JPanel(new GridBagLayout());	boolean isAppointmentsSplitPaneDividerLowered = false;	MatteBorder appointmentsHeaderPanelBorder = new MatteBorder(8, 8, 0, 8, SystemWindow.quintessentialThemeColor);	MatteBorder appointmentsContentPanelBorder = new MatteBorder(0, 8, 8, 8, SystemWindow.quintessentialThemeColor);	JPanel viewMedicalCodesJPanel = new JPanel(new GridBagLayout());	static CardLayout viewMedicalCodesCardLayout = new CardLayout();	static JPanel viewMedicalCodesCardedJPanel = new JPanel(viewMedicalCodesCardLayout);	static JPanel viewMedicalCodesButtonsJPanel = new JPanel(new GridBagLayout());	JPanel blankCodeSetCoverJPanel = new JPanel(new GridBagLayout());	JPanel rXNormCodeSetJPanel = new JPanel(new GridBagLayout());	JPanel hL7CodeSetJPanel = new JPanel(new GridBagLayout());	JPanel lOINCCodeSetJPanel = new JPanel(new GridBagLayout());	JPanel cPTCodeSetJPanel = new JPanel(new GridBagLayout());	JPanel iCDCodeSetJPanel = new JPanel(new GridBagLayout());	static JButton rXNormCodeSetJButton = new JButton();	static JButton hL7CodeSetJButton = new JButton();	static JButton lOINCCodeSetJButton = new JButton();	static JButton cPTCodeSetJButton = new JButton();	static JButton iCDCodeSetJButton = new JButton();	static JLabel stringToFindInCodeSetJLabel = new JLabel("Enter search term: ");	static JTextField queryToFindInCodeSetJTextField = new JTextField(30);	static JLabel rXNormCodeSetAbbreviatedCodeButtonJLabel = new JLabel("RxNorm");	static JLabel rXNormCodeSetCodeNameButtonJLabel = new JLabel("RxNorm");	static JLabel rXNormCodeSetVersionButtonJLabel = new JLabel("version RXNCONSO09072010");	static JLabel hL7CodeSetAbbreviatedCodeButtonJLabel = new JLabel("HL-7");	static JLabel hL7CodeSetCodeNameButtonJLabel = new JLabel("Health Level-7");	static JLabel hL7CodeSetVersionButtonJLabel = new JLabel("version 2.3.1");	static JLabel cPTCodeSetAbbreviatedCodeButtonJLabel = new JLabel("CPT");	static JLabel cPTCodeSetCodeNameButtonJLabel = new JLabel("Current Procedural Terminology");	static JLabel cPTCodeSetVersionButtonJLabel = new JLabel("version 2009");	static JLabel iCDCodeSetAbbreviatedCodeButtonJLabel = new JLabel("ICD-10");	static JLabel iCDCodeSetCodeNameButtonJLabel = new JLabel("International Classification of Disease");	static JLabel iCDCodeSetVersionButtonJLabel = new JLabel("version 10");	static JLabel lOINCCodeSetAbbreviatedCodeButtonJLabel = new JLabel("LOINC");	static JLabel lOINCCodeSetCodeNameButtonJLabel = new JLabel("Logical Observation Identifiers Names and Codes");	static JLabel lOINCCodeSetVersionButtonJLabel = new JLabel("version 2.3");	JButton HCPCS1CodeSetJButton = new JButton("HCPCS level 1 (version blah)");	JButton HCPCS2CodeSetJButton = new JButton("HCPCS level 2 (version blah)");	JPanel selectUserFromMPIScrollPaneJPanel = new JPanel(new GridBagLayout());	JPanel schedulingInputAndMUIJPanel = new JPanel(new GridBagLayout());	JButton selectUserForAppointmentSchedulingJButton = new JButton(" Enter ");	JLabel selectUserIDOrNameJLabel = new JLabel(" Select a user below or enter a user ID or name: ");	JTextField selectUserIDOrNameJTextField = new JTextField(12);	JPanel masterUserIndexJPanel = new JPanel(new GridBagLayout());	JScrollPane masterUserIndexJScrollPane = new JScrollPane(masterUserIndexJPanel);	JLabel masterUserIndexJLabel = new JLabel("Master User Index: ");	JButton option1JButton = new JButton(" option1JButton ");	JButton option2JButton = new JButton("option2JButton ");	JButton option3JButton = new JButton(" option3JButton ");	JPanel selectUserIDOrNameJPanel = new JPanel(new GridBagLayout());	GridBagConstraints appointmentProvidorsPopupMenuConstraints = new GridBagConstraints();	GridBagConstraints appointmentsDayPanelBasePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsWeekPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsDayPanelConstraints = new GridBagConstraints();	GridBagConstraints providerChoicesPanelConstraints = new GridBagConstraints();	GridBagConstraints arrowLabelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsMonthPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPaperFormBasePanelScrollPaneBasePanelConstraints = new GridBagConstraints();	GridBagConstraints reportsPanelConstraints = new GridBagConstraints();	GridBagConstraints reportsPanelButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints outputNetworkPanelScrollPanePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPaperPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsButtonConstraints = new GridBagConstraints();	GridBagConstraints appointmentsDayOfMonthButtonPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientSocialSecurityNumberPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientSexPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientPhonePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientEmailPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsAppointmentTypePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsLengthPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientGivenNamePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientMiddleInitialOrNamePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientFamilyNamePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientNameSuffixPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientNameDegreePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientLastNamePrefixPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsAppointmentProvidorsPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsIncreaseOrDecreaseViewingDatePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsButtonsConstraints = new GridBagConstraints();	GridBagConstraints outputNetworkJScrollPaneBasePanelConstraints = new GridBagConstraints();	GridBagConstraints inputPanelHeaderPanelConstraints = new GridBagConstraints();	GridBagConstraints outputNetworkHeaderPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAppointmentDatePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAppointmentTimePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsTimePanelConstraints = new GridBagConstraints();	GridBagConstraints selectUserIDOrNamePanelConstraints = new GridBagConstraints();	GridBagConstraints masterUserIndexJPanelConstraints = new GridBagConstraints();	GridBagConstraints patientIndexPanelConstraints = new GridBagConstraints();	GridBagConstraints schedulingPanelConstraints = new GridBagConstraints();	GridBagConstraints anotherPanelConstraints = new GridBagConstraints();	GridBagConstraints lOINCCodePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsUserGroupButtonConstraints = new GridBagConstraints();	GridBagConstraints inputNetworkFilesPanelConstraints = new GridBagConstraints();	GridBagConstraints outputNetworkFilesPanelConstraints = new GridBagConstraints();	GridBagConstraints networkFilesPanelConstraints = new GridBagConstraints();	GridBagConstraints schedulingInputAndMUIPanelConstraints = new GridBagConstraints();	GridBagConstraints selectUserFromMPIScrollPanePanelConstraints = new GridBagConstraints();	GridBagConstraints viewMedicalCodesPanelConstraints = new GridBagConstraints();	GridBagConstraints viewMedicalCodesButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints codeSetPanelConstraints = new GridBagConstraints();	GridBagConstraints codeSetButtonPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsSplitPaneBasePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsContentPanelConstraints = new GridBagConstraints();	GridBagConstraints reportsContentPanelScrollPanePanelConstraints = new GridBagConstraints();	GridBagConstraints patientIndexButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints billingPanelScrollPaneBasePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPaperFormPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPaperFormBasePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsHeaderPanelConstraints = new GridBagConstraints();	GridBagConstraints mainButtonsPanelConstraints = new GridBagConstraints();	GridBagConstraints contentPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressStreetOrMailingAddressPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressStreetNamePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressDwellingNumberPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressCityPanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressStateOrProvincePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressZipOrPostalCodePanelConstraints = new GridBagConstraints();	GridBagConstraints appointmentsPatientAddressCountryPanelConstraints = new GridBagConstraints();	PracticeWindow() {		setLocation(practiceLocation.width, practiceLocation.height);		monthCalendar.setLenient(true);		titleBarJLabel.setText("Practice Assistant  -  Oochis EHR");		addTalkbackText("Practice Assistant  -  Oochis EHR", null, false);		mainButtonsPaneBottomLineJPanel.setBorder(new MatteBorder(4, 0, 0, 0, new Color(128, 128, 128, 128)));		mainButtonsPaneBottomLineJPanel.setBackground(SystemWindow.quintessentialThemeColor);		mainButtonsPanelBottomLineAndPusherJPanel.setBorder(new MatteBorder(4, 0, 0, 0, new Color(128, 128, 128, 128)));		mainButtonsPanelBottomLineAndPusherJPanel.setBackground(SystemWindow.quintessentialThemeColor);		mainButtonsJPanel.setBorder(new BevelBorder(BevelBorder.RAISED));		mainButtonsJPanel.setBackground(SystemWindow.quintessentialThemeColor);		mainButtonsPanelConstraints.insets = new Insets(margin, margin, margin, margin);		mainButtonsPanelConstraints.fill = GridBagConstraints.BOTH;		mainButtonsPanelConstraints.gridy = 0;		mainButtonsJPanel.add(patientIndexJButton, mainButtonsPanelConstraints);		mainButtonsPanelConstraints.gridy = 1;		mainButtonsJPanel.add(billingJButton, mainButtonsPanelConstraints);		mainButtonsPanelConstraints.gridy = 2;		mainButtonsJPanel.add(reportsJButton, mainButtonsPanelConstraints);		mainButtonsPanelConstraints.gridy = 3;		mainButtonsJPanel.add(appointmentsJButton, mainButtonsPanelConstraints);		mainButtonsPanelConstraints.gridy = 4;		mainButtonsJPanel.add(viewMedicalCodesJButton, mainButtonsPanelConstraints);		mainButtonsPanelConstraints.gridy = 5;		mainButtonsPanelConstraints.fill = GridBagConstraints.BOTH;		mainButtonsPanelConstraints.insets = new Insets(margin, margin, margin, margin);		mainButtonsJPanel.add(mainButtonsPaneBottomLineJPanel, mainButtonsPanelConstraints);		mainButtonsPanelConstraints.weighty = 1;		mainButtonsPanelConstraints.gridy = 6;		mainButtonsPanelConstraints.insets = new Insets(0, 16, 0, 16);		mainButtonsJPanel.add(mainButtonsPanelBottomLineAndPusherJPanel, mainButtonsPanelConstraints);		contentPanelConstraints.gridy = 0;		contentPanelConstraints.gridx = 0;		contentPanelConstraints.gridwidth = 2;		contentPanelConstraints.weightx = 1;		contentPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		contentPanelConstraints.gridy = 1;		contentPanelConstraints.gridx = 0;		contentPanelConstraints.gridwidth = 1;		contentPanelConstraints.weighty = 1;		contentPanelConstraints.weightx = 0;		contentPanelConstraints.fill = GridBagConstraints.VERTICAL;		contentPanelConstraints.insets = new Insets(6, 0, 0, 3);		contentJPanel.add(mainButtonsJPanel, contentPanelConstraints);		contentPanelConstraints.gridy = 1;		contentPanelConstraints.gridx = 1;		contentPanelConstraints.weightx = 1;		contentPanelConstraints.insets = new Insets(6, 3, 0, 0);		contentPanelConstraints.fill = GridBagConstraints.BOTH;		contentJPanel.add(mainCardedBaseJPanel, contentPanelConstraints);		patientIndexJButton.setForeground(SystemWindow.mainButtonsFontColor);		patientIndexJButton.setMnemonic('P');		patientIndexJButton.addActionListener(this);		patientIndexJButton.setActionCommand("patientIndexJButton");		patientIndexJButton.setPreferredSize(practiceMainButtonsDimension);		patientIndexJButton.setSize(practiceMainButtonsDimension);		patientIndexJButton.setMinimumSize(practiceMainButtonsDimension);		billingJButton.setForeground(SystemWindow.mainButtonsFontColor);		billingJButton.setMnemonic('B');		billingJButton.addActionListener(this);		billingJButton.setActionCommand("billingJButton");		billingJButton.setPreferredSize(practiceMainButtonsDimension);		billingJButton.setSize(practiceMainButtonsDimension);		billingJButton.setMinimumSize(practiceMainButtonsDimension);		reportsJButton.setForeground(SystemWindow.mainButtonsFontColor);		reportsJButton.setMnemonic('B');		reportsJButton.addActionListener(this);		reportsJButton.setActionCommand("reportsJButton");		reportsJButton.setPreferredSize(practiceMainButtonsDimension);		reportsJButton.setSize(practiceMainButtonsDimension);		reportsJButton.setMinimumSize(practiceMainButtonsDimension);		appointmentsJButton.setLayout(new GridBagLayout());		appointmentsJButton.add(appointmentsButton1JLabel, appointmentsButtonConstraints);		appointmentsButtonConstraints.gridy = 1;		appointmentsJButton.add(appointmentsButton2JLabel, appointmentsButtonConstraints);		appointmentsJButton.setForeground(SystemWindow.mainButtonsFontColor);		appointmentsJButton.setMnemonic('A');		appointmentsJButton.addActionListener(this);		appointmentsJButton.setActionCommand("appointmentsJButton");		appointmentsJButton.setPreferredSize(practiceMainButtonsDimension);		appointmentsJButton.setSize(practiceMainButtonsDimension);		appointmentsJButton.setMinimumSize(practiceMainButtonsDimension);		viewMedicalCodesJButton.setForeground(SystemWindow.mainButtonsFontColor);		viewMedicalCodesJButton.setMnemonic('M');		viewMedicalCodesJButton.addActionListener(this);		viewMedicalCodesJButton.setActionCommand("viewMedicalCodesJButton");		viewMedicalCodesJButton.setPreferredSize(practiceMainButtonsDimension);		viewMedicalCodesJButton.setSize(practiceMainButtonsDimension);		viewMedicalCodesJButton.setMinimumSize(practiceMainButtonsDimension);		masterUserIndexJScrollPane.setBorder(null);		selectUserFromMPIScrollPanePanelConstraints.weightx = 1;		selectUserFromMPIScrollPanePanelConstraints.weighty = 0;		selectUserFromMPIScrollPanePanelConstraints.fill = GridBagConstraints.NONE;		selectUserFromMPIScrollPaneJPanel.add(masterUserIndexJScrollPane, selectUserFromMPIScrollPanePanelConstraints);		selectUserFromMPIScrollPanePanelConstraints.gridy = 1;		selectUserFromMPIScrollPanePanelConstraints.weighty = 1;		selectUserFromMPIScrollPanePanelConstraints.fill = GridBagConstraints.BOTH;		selectUserFromMPIScrollPaneJPanel.add(new JLabel(" "), selectUserFromMPIScrollPanePanelConstraints);		selectUserForAppointmentSchedulingJButton.addActionListener(this);		selectUserForAppointmentSchedulingJButton.setActionCommand("USERSELECTED");		selectUserIDOrNameJTextField.addActionListener(this);		selectUserIDOrNameJTextField.setActionCommand("USERSELECTED");		schedulingInputAndMUIPanelConstraints.insets = new Insets(4, 4, 4, 4);		schedulingInputAndMUIJPanel.add(selectUserIDOrNameJPanel, schedulingInputAndMUIPanelConstraints);		schedulingInputAndMUIPanelConstraints.gridy = 1;		schedulingInputAndMUIPanelConstraints.gridx = 0;		schedulingInputAndMUIPanelConstraints.gridwidth = 2;		schedulingInputAndMUIPanelConstraints.weighty = 1;		schedulingInputAndMUIPanelConstraints.fill = GridBagConstraints.VERTICAL;		schedulingInputAndMUIJPanel.add(selectUserFromMPIScrollPaneJPanel, schedulingInputAndMUIPanelConstraints);		selectUserIDOrNamePanelConstraints.gridwidth = 2;		selectUserIDOrNamePanelConstraints.insets = new Insets(0, 0, 4, 0);		selectUserIDOrNameJPanel.add(selectUserIDOrNameJLabel, selectUserIDOrNamePanelConstraints);		selectUserIDOrNamePanelConstraints.gridy = 1;		selectUserIDOrNamePanelConstraints.gridwidth = 1;		selectUserIDOrNamePanelConstraints.weightx = 1;		selectUserIDOrNameJPanel.add(selectUserIDOrNameJTextField, selectUserIDOrNamePanelConstraints);		selectUserIDOrNamePanelConstraints.gridx = 1;		selectUserIDOrNameJPanel.add(selectUserForAppointmentSchedulingJButton, selectUserIDOrNamePanelConstraints);		selectUserIDOrNamePanelConstraints.gridy = 2;		selectUserIDOrNamePanelConstraints.gridx = 0;		selectUserIDOrNamePanelConstraints.weightx = 0;		selectUserIDOrNameJPanel.add(new JLabel("Name: "), selectUserIDOrNamePanelConstraints);		selectUserIDOrNamePanelConstraints.gridx = 1;		selectUserIDOrNameJPanel.add(new JLabel("User ID: "), selectUserIDOrNamePanelConstraints);		masterUserIndexJPanelConstraints.gridwidth = 6;		masterUserIndexJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(64, 64, 64)));		masterUserIndexJPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		masterUserIndexJPanel.setOpaque(false);		masterUserIndexJPanelConstraints.fill = GridBagConstraints.NONE;		masterUserIndexJPanelConstraints.anchor = GridBagConstraints.WEST;		masterUserIndexJPanelConstraints.insets = new Insets(0, 2, 4, 2);		schedulingInputAndMUIJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		schedulingPanelConstraints.weighty = 1;		schedulingPanelConstraints.fill = GridBagConstraints.BOTH;		schedulingPanelConstraints.insets = new Insets(0, 0, 0, 10);		schedulingJPanel.add(schedulingInputAndMUIJPanel, schedulingPanelConstraints);		schedulingPanelConstraints.gridx = 1;		schedulingPanelConstraints.weighty = 1;		schedulingPanelConstraints.weightx = 1;		schedulingPanelConstraints.insets = new Insets(0, 0, 0, 0);		addAnOutputDirectoryJButton.addActionListener(this);		addAnOutputDirectoryJButton.setActionCommand("addAnOutputDirectoryJButton");		outputNetworkBrowseJButton.addActionListener(this);		outputNetworkBrowseJButton.setActionCommand("outputNetworkBrowseJButton");		addAnOutputDirectoryJTextField.addActionListener(this);		addAnOutputDirectoryJTextField.setActionCommand("addAnOutputDirectoryJButton");		outputNetworkHeaderJPanel.setBackground(SystemWindow.quintessentialThemeColor);		outputNetworkHeaderPanelConstraints.anchor = GridBagConstraints.WEST;		outputNetworkHeaderPanelConstraints.insets = new Insets(8, 16, 4, 4);		outputNetworkHeaderJPanel.add(outputNetworkHeaderJLabel, outputNetworkHeaderPanelConstraints);		outputNetworkHeaderPanelConstraints.gridx = 1;		outputNetworkHeaderPanelConstraints.weightx = 1;		outputNetworkHeaderPanelConstraints.insets = new Insets(8, 4, 4, 4);		outputNetworkHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		outputNetworkHeaderJPanel.add(outputNetworkJTextfield, outputNetworkHeaderPanelConstraints);		outputNetworkHeaderPanelConstraints.gridx = 2;		outputNetworkHeaderPanelConstraints.weightx = 0;		outputNetworkHeaderPanelConstraints.insets = new Insets(8, 4, 4, 16);		outputNetworkHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		outputNetworkHeaderJPanel.add(outputNetworkBrowseJButton, outputNetworkHeaderPanelConstraints);		outputNetworkHeaderPanelConstraints.gridy = 1;		outputNetworkHeaderPanelConstraints.gridx = 0;		outputNetworkHeaderPanelConstraints.insets = new Insets(4, 16, 4, 4);		outputNetworkHeaderJPanel.add(addAnOutputDirectoryHeaderJLabel, outputNetworkHeaderPanelConstraints);		outputNetworkHeaderPanelConstraints.gridx = 1;		outputNetworkHeaderPanelConstraints.weightx = 1;		outputNetworkHeaderPanelConstraints.insets = new Insets(4, 4, 4, 4);		outputNetworkHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		outputNetworkHeaderJPanel.add(addAnOutputDirectoryJTextField, outputNetworkHeaderPanelConstraints);		outputNetworkHeaderPanelConstraints.gridx = 2;		outputNetworkHeaderPanelConstraints.weightx = 0;		outputNetworkHeaderPanelConstraints.insets = new Insets(4, 16, 4, 16);		outputNetworkHeaderJPanel.add(addAnOutputDirectoryJButton, outputNetworkHeaderPanelConstraints);		inputNetworkHeaderJPanel.setBackground(SystemWindow.quintessentialThemeColor);		inputPanelHeaderPanelConstraints.anchor = GridBagConstraints.WEST;		inputPanelHeaderPanelConstraints.insets = new Insets(8, 16, 4, 4);		inputNetworkHeaderJPanel.add(inputNetworkHeaderJLabel, inputPanelHeaderPanelConstraints);		inputPanelHeaderPanelConstraints.gridx = 1;		inputPanelHeaderPanelConstraints.weightx = 1;		inputPanelHeaderPanelConstraints.insets = new Insets(8, 4, 4, 4);		inputPanelHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		inputNetworkHeaderJPanel.add(inputNetworkJTextfield, inputPanelHeaderPanelConstraints);		inputPanelHeaderPanelConstraints.gridx = 2;		inputPanelHeaderPanelConstraints.weightx = 0;		inputPanelHeaderPanelConstraints.insets = new Insets(8, 4, 4, 16);		inputPanelHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		inputNetworkHeaderJPanel.add(inputNetworkBrowseJButton, inputPanelHeaderPanelConstraints);		inputPanelHeaderPanelConstraints.gridy = 1;		inputPanelHeaderPanelConstraints.gridx = 0;		inputPanelHeaderPanelConstraints.insets = new Insets(4, 16, 4, 4);		inputNetworkHeaderJPanel.add(addAnInputDirectoryHeaderJLabel, inputPanelHeaderPanelConstraints);		inputPanelHeaderPanelConstraints.gridx = 1;		inputPanelHeaderPanelConstraints.weightx = 1;		inputPanelHeaderPanelConstraints.insets = new Insets(4, 4, 4, 4);		inputPanelHeaderPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		inputNetworkHeaderJPanel.add(addAnInputDirectoryJTextField, inputPanelHeaderPanelConstraints);		inputPanelHeaderPanelConstraints.gridx = 2;		inputPanelHeaderPanelConstraints.weightx = 0;		inputPanelHeaderPanelConstraints.insets = new Insets(4, 16, 4, 16);		inputNetworkHeaderJPanel.add(addAnInputDirectoryJButton, inputPanelHeaderPanelConstraints);		outputNetworkJScrollPaneBaseJPanel.add(exportNetworkDirectoryJLabel, outputNetworkJScrollPaneBasePanelConstraints);		outputNetworkJScrollPaneBasePanelConstraints.gridx = 1;		outputNetworkJScrollPaneBaseJPanel.add(exportNetworkDirectoryOutputJLabel, outputNetworkJScrollPaneBasePanelConstraints);		outputNetworkJScrollPaneBasePanelConstraints.gridx = 2;		outputNetworkJScrollPaneBasePanelConstraints.weightx = 1;		outputNetworkJScrollPaneBaseJPanel.add(exportNetworkDirectoryOutputPusherJLabel, outputNetworkJScrollPaneBasePanelConstraints);		outputNetworkJScrollPaneBasePanelConstraints.weighty = 1;		outputNetworkJScrollPaneBasePanelConstraints.fill = GridBagConstraints.BOTH;		outputNetworkJScrollPaneBasePanelConstraints.gridwidth = 3;		outputNetworkJScrollPaneBasePanelConstraints.gridx = 0;		outputNetworkJScrollPaneBasePanelConstraints.gridy = 1;		outputNetworkJScrollPaneBaseJPanel.add(outputNetworkJScrollPane, outputNetworkJScrollPaneBasePanelConstraints);		outputNetworkJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);		outputNetworkJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);		billingPanelScrollPaneBasePanelConstraints.weighty = 1;		billingPanelScrollPaneBasePanelConstraints.weightx = 1;		billingPanelScrollPaneBasePanelConstraints.fill = GridBagConstraints.BOTH;		outputNetworkPanelContentJPanel.add(outputNetworkJScrollPaneBaseJPanel, billingPanelScrollPaneBasePanelConstraints);		outputNetworkFilesPanelConstraints.weightx = 1;		outputNetworkFilesPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		outputNetworkFilesJPanel.add(outputNetworkHeaderJPanel, outputNetworkFilesPanelConstraints);		outputNetworkFilesPanelConstraints.gridy = 1;		outputNetworkFilesPanelConstraints.weighty = 1;		outputNetworkFilesPanelConstraints.fill = GridBagConstraints.BOTH;		outputNetworkFilesJPanel.add(outputNetworkPanelContentJPanel, outputNetworkFilesPanelConstraints);		inputNetworkFilesPanelConstraints.weightx = 1;		inputNetworkFilesPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		inputNetworkFilesJPanel.add(inputNetworkHeaderJPanel, inputNetworkFilesPanelConstraints);		inputNetworkFilesPanelConstraints.gridy = 1;		inputNetworkFilesPanelConstraints.weighty = 1;		inputNetworkFilesPanelConstraints.fill = GridBagConstraints.BOTH;		inputNetworkFilesJPanel.add(inputNetworkPanelContentJPanel, inputNetworkFilesPanelConstraints);		appointmentsDayOfMonthViewingOptionJToggleButton.addActionListener(this);		appointmentsDayOfMonthViewingOptionJToggleButton.setActionCommand("appointmentsDayOfMonthViewingOptionJToggleButton");		appointmentsWeekViewingOptionJToggleButton.addActionListener(this);		appointmentsWeekViewingOptionJToggleButton.setActionCommand("appointmentsWeekViewingOptionJToggleButton");		appointmentsMonthViewingOptionJToggleButton.addActionListener(this);		appointmentsMonthViewingOptionJToggleButton.setActionCommand("appointmentsMonthViewingOptionJToggleButton");		componentSizer(appointmentsPatientAppointmentDateJLabel, appointmentsPatientAppointmentDateLabelDimension, null, "ALL");		componentSizer(appointmentCalendarDayOfWeekJTextField, appointmentsDayOfWeekTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarComma1AndSpaceJTextField, appointmentsComma1AndSpaceTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarMonthJTextField, appointmentsMonthTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarDayOfMonthJTextField, appointmentsDayOfMonthTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarComma2JTextField, appointmentsComma2TextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarYearJTextField, appointmentsYearTextFieldDimension, null, "ALL");		componentSizer(appointmentsPatientAppointmentTimeJLabel, appointmentsPatientAppointmentTimeLabelDimension, null, "ALL");		componentSizer(appointmentCalendarHourJTextField, appointmentsHourTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarColonJTextField, appointmentsColonTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarMinuteJTextField, appointmentsMinuteTextFieldDimension, null, "ALL");		componentSizer(appointmentCalendarAmPmJTextField, appointmentsAmPmTextFieldDimension, null, "ALL");		appointmentProvidorsJPopupMenu.setLayout(new GridBagLayout());		appointmentProvidorsJPopupMenu.add(appointmentProvidorsPopupMenuJScrollPane, appointmentProvidorsPopupMenuConstraints);		appointmentProvidorsPopupMenuJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		appointmentsAppointmentProvidorsJTextField.setBorder(null);		appointmentsAppointmentProvidorsJTextField.setForeground(SystemWindow.outputColor);		appointmentsAppointmentProvidorsJTextField.setOpaque(false);		appointmentsAppointmentProvidorsJTextField.addMouseListener(this);		appointmentsAppointmentProvidorsJTextField.setName("appointmentsAppointmentProvidorsJTextField");		appointmentsAppointmentProvidorsJLabel.addMouseListener(this);		appointmentsAppointmentProvidorsJLabel.setName("appointmentsAppointmentProvidorsJLabel");		appointmentsPatientGivenNameJTextField.setBorder(null);		appointmentsPatientGivenNameJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientPhoneNumberJTextField.setBorder(null);		appointmentsPatientPhoneNumberJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientEmailJTextField.setBorder(null);		appointmentsPatientEmailJTextField.setForeground(SystemWindow.outputColor);		appointmentsPrintJButton.setActionCommand("appointmentsPrintJButton");		appointmentsPrintJButton.addActionListener(this);		appointmentsEmailReminderJButton.setActionCommand("appointmentsEmailReminderJButton");		appointmentsEmailReminderJButton.addActionListener(this);		appointmentsSaveJButton.addActionListener(this);		appointmentsSaveJButton.setActionCommand("appointmentsSaveJButton");		appointmentsNextViewJButton.addActionListener(this);		appointmentsNextViewJButton.setActionCommand("appointmentsNextViewJButton");		appointmentsBackViewJButton.addActionListener(this);		appointmentsBackViewJButton.setActionCommand("appointmentsBackViewJButton");		appointmentsIncreaseOrDecreaseViewingDateJPanel.setOpaque(false);		appointmentsIncreaseOrDecreaseViewingDatePanelConstraints.insets = new Insets(0, 0, 0, 6);		appointmentsIncreaseOrDecreaseViewingDateJPanel.add(appointmentsNextViewJButton, appointmentsIncreaseOrDecreaseViewingDatePanelConstraints);		appointmentsIncreaseOrDecreaseViewingDatePanelConstraints.gridx = 1;		appointmentsIncreaseOrDecreaseViewingDatePanelConstraints.insets = new Insets(0, 6, 0, 0);		appointmentsIncreaseOrDecreaseViewingDateJPanel.add(appointmentsBackViewJButton, appointmentsIncreaseOrDecreaseViewingDatePanelConstraints);		appointmentsChartIDJTextField.setBorder(null);		appointmentsChartIDJLabel.setOpaque(false);		mainButtonsPaneBottomLineJPanel.setBorder(new MatteBorder(4, 0, 0, 0, new Color(128, 128, 128, 128)));		mainButtonsPaneBottomLineJPanel.setBackground(SystemWindow.quintessentialThemeColor);		appointmentCalendarDayOfWeekJTextField.addFocusListener(this);		appointmentCalendarDayOfWeekJTextField.addKeyListener(this);		appointmentCalendarDayOfWeekJTextField.addMouseListener(this);		appointmentCalendarDayOfWeekJTextField.addActionListener(this);		appointmentCalendarDayOfWeekJTextField.setActionCommand("appointmentCalendarDayOfWeekJTextField");		appointmentCalendarDayOfWeekJTextField.setName("appointmentCalendarDayOfWeekJTextField");		appointmentCalendarDayOfWeekJTextField.setBorder(null);		appointmentCalendarDayOfWeekJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarDayOfWeekJTextField.setBackground(Color.WHITE);		appointmentCalendarDayOfWeekJTextField.setDisabledTextColor(SystemWindow.outputColor);		appointmentCalendarDayOfWeekJTextField.setHorizontalAlignment(SwingConstants.RIGHT);		appointmentCalendarComma1AndSpaceJTextField.setText(", ");		appointmentCalendarComma1AndSpaceJTextField.setBorder(null);		appointmentCalendarComma1AndSpaceJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarComma1AndSpaceJTextField.setEditable(false);		appointmentCalendarComma1AndSpaceJTextField.setBackground(Color.WHITE);		appointmentCalendarComma1AndSpaceJTextField.setEnabled(false);		appointmentCalendarMonthJTextField.addFocusListener(this);		appointmentCalendarMonthJTextField.addKeyListener(this);		appointmentCalendarMonthJTextField.addMouseListener(this);		appointmentCalendarMonthJTextField.addActionListener(this);		appointmentCalendarMonthJTextField.setActionCommand("appointmentCalendarMonthJTextField");		appointmentCalendarMonthJTextField.setName("appointmentCalendarMonthJTextField");		appointmentCalendarMonthJTextField.setBorder(null);		appointmentCalendarMonthJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarMonthJTextField.setHorizontalAlignment(SwingConstants.RIGHT);		appointmentCalendarMonthJTextField.setBackground(Color.WHITE);		appointmentCalendarDayOfMonthJTextField.addFocusListener(this);		appointmentCalendarDayOfMonthJTextField.addKeyListener(this);		appointmentCalendarDayOfMonthJTextField.addMouseListener(this);		appointmentCalendarDayOfMonthJTextField.addActionListener(this);		appointmentCalendarDayOfMonthJTextField.setActionCommand("appointmentCalendarDayOfMonthJTextField");		appointmentCalendarDayOfMonthJTextField.setName("appointmentCalendarDayOfMonthJTextField");		appointmentCalendarDayOfMonthJTextField.setBorder(null);		appointmentCalendarDayOfMonthJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarDayOfMonthJTextField.setBackground(Color.WHITE);		appointmentCalendarDayOfMonthJTextField.setHorizontalAlignment(SwingConstants.RIGHT);		appointmentCalendarComma2JTextField.setText(",");		appointmentCalendarComma2JTextField.setBorder(null);		appointmentCalendarComma2JTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarComma2JTextField.setEditable(false);		appointmentCalendarComma2JTextField.setBackground(Color.WHITE);		appointmentCalendarComma2JTextField.setEnabled(false);		appointmentCalendarYearJTextField.addFocusListener(this);		appointmentCalendarYearJTextField.addKeyListener(this);		appointmentCalendarYearJTextField.addMouseListener(this);		appointmentCalendarYearJTextField.addActionListener(this);		appointmentCalendarYearJTextField.setActionCommand("appointmentCalendarYearJTextField");		appointmentCalendarYearJTextField.setName("appointmentCalendarYearJTextField");		appointmentCalendarYearJTextField.setBorder(null);		appointmentCalendarYearJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarYearJTextField.setHorizontalAlignment(SwingConstants.CENTER);		appointmentCalendarHourJTextField.addFocusListener(this);		appointmentCalendarHourJTextField.addKeyListener(this);		appointmentCalendarHourJTextField.addMouseListener(this);		appointmentCalendarHourJTextField.addActionListener(this);		appointmentCalendarHourJTextField.setActionCommand("appointmentCalendarHourJTextField");		appointmentCalendarHourJTextField.setName("appointmentCalendarHourJTextField");		appointmentCalendarHourJTextField.setBorder(null);		appointmentCalendarHourJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarHourJTextField.setHorizontalAlignment(SwingConstants.RIGHT);		appointmentCalendarColonJTextField.setText(":");		appointmentCalendarColonJTextField.setBorder(null);		appointmentCalendarColonJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarColonJTextField.setEditable(false);		appointmentCalendarColonJTextField.setBackground(Color.WHITE);		appointmentCalendarColonJTextField.setEnabled(false);		appointmentCalendarMinuteJTextField.addFocusListener(this);		appointmentCalendarMinuteJTextField.addKeyListener(this);		appointmentCalendarMinuteJTextField.addMouseListener(this);		appointmentCalendarMinuteJTextField.addActionListener(this);		appointmentCalendarMinuteJTextField.setActionCommand("appointmentCalendarMinuteJTextField");		appointmentCalendarMinuteJTextField.setName("appointmentCalendarMinuteJTextField");		appointmentCalendarMinuteJTextField.setBorder(null);		appointmentCalendarMinuteJTextField.setForeground(SystemWindow.outputColor);		appointmentCalendarMinuteJTextField.setHorizontalAlignment(SwingConstants.LEFT);		appointmentCalendarAmPmJTextField.addFocusListener(this);		appointmentCalendarAmPmJTextField.addKeyListener(this);		appointmentCalendarAmPmJTextField.addMouseListener(this);		appointmentCalendarAmPmJTextField.addActionListener(this);		appointmentCalendarAmPmJTextField.setActionCommand("appointmentCalendarAmPmJTextField");		appointmentCalendarAmPmJTextField.setName("appointmentCalendarAmPmJTextField");		appointmentCalendarAmPmJTextField.setBorder(null);		appointmentCalendarAmPmJTextField.setEnabled(false);		appointmentCalendarAmPmJTextField.setDisabledTextColor(SystemWindow.outputColor);		appointmentCalendarAmPmJTextField.setHorizontalAlignment(SwingConstants.LEFT);		appointmentCalendarAmPmJTextField.setBackground(Color.WHITE);		appointmentsButtonsJPanel.setBackground(SystemWindow.quintessentialThemeColor);		appointmentsButtonsJPanel.setOpaque(false);		appointmentsButtonsConstraints.insets = new Insets(8, 20, 8, 6);		appointmentsButtonsConstraints.gridx = 1;		appointmentsButtonsConstraints.insets = new Insets(8, 6, 8, 6);		appointmentsButtonsJPanel.add(appointmentsWeekViewingOptionJToggleButton, appointmentsButtonsConstraints);		appointmentsButtonsConstraints.gridx = 2;		appointmentsButtonsJPanel.add(appointmentsMonthViewingOptionJToggleButton, appointmentsButtonsConstraints);		appointmentsButtonsConstraints.gridx = 3;		appointmentsButtonsConstraints.insets = new Insets(8, 18, 8, 6);		appointmentsButtonsJPanel.add(appointmentsIncreaseOrDecreaseViewingDateJPanel, appointmentsButtonsConstraints);		appointmentsButtonsConstraints.gridx = 4;		appointmentsButtonsConstraints.insets = new Insets(8, 6, 8, 6);		appointmentsButtonsJPanel.add(appointmentsPrintJButton, appointmentsButtonsConstraints);		appointmentsButtonsConstraints.gridx = 5;		appointmentsButtonsJPanel.add(appointmentsEmailReminderJButton, appointmentsButtonsConstraints);		appointmentsButtonsConstraints.gridx = 6;		appointmentsButtonsJPanel.add(appointmentsSaveJButton, appointmentsButtonsConstraints);		appointmentsButtonsConstraints.gridx = 7;		appointmentsButtonsConstraints.insets = new Insets(8, 6, 8, 20);		appointmentsButtonsJPanel.add(appointmentsPhoneReminderJButton, appointmentsButtonsConstraints);		appointmentsPatientAppointmentTimeJPanel.setOpaque(false);		appointmentsPatientAppointmentTimeJPanel.setBorder(userInputLineBorder);		appointmentsPatientAppointmentTimePanelConstraints.gridx = 0;		appointmentsPatientAppointmentTimeJPanel.add(appointmentsPatientAppointmentTimeJLabel, appointmentsPatientAppointmentTimePanelConstraints);		appointmentsPatientAppointmentTimePanelConstraints.gridx++;		appointmentsPatientAppointmentTimeJPanel.add(appointmentCalendarHourJTextField, appointmentsPatientAppointmentTimePanelConstraints);		appointmentsPatientAppointmentTimePanelConstraints.gridx++;		appointmentsPatientAppointmentTimeJPanel.add(appointmentCalendarColonJTextField, appointmentsPatientAppointmentTimePanelConstraints);		appointmentsPatientAppointmentTimePanelConstraints.gridx++;		appointmentsPatientAppointmentTimeJPanel.add(appointmentCalendarMinuteJTextField, appointmentsPatientAppointmentTimePanelConstraints);		appointmentsPatientAppointmentTimePanelConstraints.gridx++;		appointmentsPatientAppointmentTimePanelConstraints.weightx = 1;		appointmentsPatientAppointmentTimePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAppointmentTimeJPanel.add(appointmentCalendarAmPmJTextField, appointmentsPatientAppointmentTimePanelConstraints);		appointmentsContentJPanel.setBorder(appointmentsContentPanelBorder);		appointmentsContentJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		slider.setOpaque(false);		slider.setMajorTickSpacing(42);		slider.setMinorTickSpacing(21);		slider.setPaintTicks(true);		slider.setMinimum(0);		slider.setMaximum(170);		slider.setPreferredSize(sliderDimension);		slider.setSize(sliderDimension);		slider.setValue(20);		appointmentsAppointmentProvidorsJPanel.setOpaque(false);		appointmentsAppointmentProvidorsJPanel.setBorder(userInputLineBorder);		appointmentsAppointmentProvidorsJPanel.addMouseListener(this);		appointmentsAppointmentProvidorsJPanel.setName("appointmentsAppointmentProvidorsJPanel");		appointmentsAppointmentProvidorsPanelConstraints.gridy = 0;		appointmentsAppointmentProvidorsJPanel.add(appointmentsAppointmentProvidorsJLabel, appointmentsAppointmentProvidorsPanelConstraints);		appointmentsAppointmentProvidorsPanelConstraints.gridx = 1;		appointmentsAppointmentProvidorsPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsAppointmentProvidorsPanelConstraints.weightx = 1;		appointmentsAppointmentProvidorsJPanel.add(appointmentsAppointmentProvidorsJTextField, appointmentsAppointmentProvidorsPanelConstraints);		appointmentsPatientNameDegreeJTextField.setBorder(null);		appointmentsPatientNameDegreeJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientNameDegreeJPanel.setOpaque(false);		appointmentsPatientNameDegreeJPanel.setBorder(userInputLineBorder);		appointmentsPatientNameDegreePanelConstraints.gridx = 0;		appointmentsPatientNameDegreeJPanel.add(appointmentsPatientNameDegreeJLabel, appointmentsPatientNameDegreePanelConstraints);		appointmentsPatientNameDegreePanelConstraints.weightx = 1;		appointmentsPatientNameDegreePanelConstraints.gridx = 1;		appointmentsPatientNameDegreePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientNameDegreeJPanel.add(appointmentsPatientNameDegreeJTextField, appointmentsPatientNameDegreePanelConstraints);		appointmentsLengthJTextField.setBorder(null);		appointmentsLengthJTextField.setForeground(SystemWindow.outputColor);		appointmentsLengthJPanel.setOpaque(false);		appointmentsLengthJPanel.setBorder(userInputLineBorder);		appointmentsLengthPanelConstraints.gridx = 0;		appointmentsLengthJPanel.add(appointmentsLengthJLabel, appointmentsLengthPanelConstraints);		appointmentsLengthPanelConstraints.weightx = 1;		appointmentsLengthPanelConstraints.gridx = 1;		appointmentsLengthPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsLengthJPanel.add(appointmentsLengthJTextField, appointmentsLengthPanelConstraints);		appointmentsPatientGivenNameJPanel.setOpaque(false);		appointmentsPatientGivenNameJPanel.setBorder(userInputLineBorder);		appointmentsPatientGivenNameJPanel.add(appointmentsPatientGivenNameJLabel, appointmentsPatientGivenNamePanelConstraints);		appointmentsPatientGivenNamePanelConstraints.gridx = 1;		appointmentsPatientGivenNamePanelConstraints.weightx = 1;		appointmentsPatientGivenNamePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientGivenNameJPanel.add(appointmentsPatientGivenNameJTextField, appointmentsPatientGivenNamePanelConstraints);		appointmentsPatientFamilyNameJTextField.setBorder(null);		appointmentsPatientFamilyNameJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientFamilyNameJPanel.setOpaque(false);		appointmentsPatientFamilyNameJPanel.setBorder(userInputLineBorder);		appointmentsPatientFamilyNameJPanel.add(appointmentsPatientFamilyNameJLabel, appointmentsPatientFamilyNamePanelConstraints);		appointmentsPatientFamilyNamePanelConstraints.gridx = 1;		appointmentsPatientFamilyNamePanelConstraints.weightx = 1;		appointmentsPatientFamilyNamePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientFamilyNameJPanel.add(appointmentsPatientFamilyNameJTextField, appointmentsPatientFamilyNamePanelConstraints);		appointmentsPatientNameSuffixJTextField.setBorder(null);		appointmentsPatientNameSuffixJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientNameSuffixJPanel.setOpaque(false);		appointmentsPatientNameSuffixJPanel.setBorder(userInputLineBorder);		appointmentsPatientNameSuffixJPanel.add(appointmentsPatientNameSuffixJLabel, appointmentsPatientNameSuffixPanelConstraints);		appointmentsPatientNameSuffixPanelConstraints.gridx = 1;		appointmentsPatientNameSuffixPanelConstraints.weightx = 1;		appointmentsPatientNameSuffixPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientNameSuffixJPanel.add(appointmentsPatientNameSuffixJTextField, appointmentsPatientNameSuffixPanelConstraints);		appointmentsPatientMiddleInitialOrNameJTextField.setBorder(null);		appointmentsPatientMiddleInitialOrNameJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientMiddleInitialOrNameJPanel.setOpaque(false);		appointmentsPatientMiddleInitialOrNameJPanel.setBorder(userInputLineBorder);		appointmentsPatientMiddleInitialOrNameJPanel.add(appointmentsPatientMiddleInitialOrNameJLabel, appointmentsPatientMiddleInitialOrNamePanelConstraints);		appointmentsPatientMiddleInitialOrNamePanelConstraints.gridx = 1;		appointmentsPatientMiddleInitialOrNamePanelConstraints.weightx = 1;		appointmentsPatientMiddleInitialOrNamePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientMiddleInitialOrNameJPanel.add(appointmentsPatientMiddleInitialOrNameJTextField, appointmentsPatientMiddleInitialOrNamePanelConstraints);		appointmentsPatientSocialSecurityNumberJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientSocialSecurityNumberJTextField.setBorder(null);		appointmentsPatientSocialSecurityNumberJPanel.setOpaque(false);		appointmentsPatientSocialSecurityNumberJPanel.setBorder(userInputLineBorder);		appointmentsPatientSocialSecurityNumberJPanel.add(appointmentsPatientSocialSecurityNumberJLabel, appointmentsPatientSocialSecurityNumberPanelConstraints);		appointmentsPatientSocialSecurityNumberPanelConstraints.weightx = 1;		appointmentsPatientSocialSecurityNumberPanelConstraints.gridx = 1;		appointmentsPatientSocialSecurityNumberPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientSocialSecurityNumberJPanel.add(appointmentsPatientSocialSecurityNumberJTextField, appointmentsPatientSocialSecurityNumberPanelConstraints);		appointmentsPatientAddressStreetOrMailingAddressJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressStreetOrMailingAddressJTextField.setBorder(null);		appointmentsPatientAddressStreetOrMailingAddressJPanel.setOpaque(false);		appointmentsPatientAddressStreetOrMailingAddressJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressStreetOrMailingAddressJPanel.add(appointmentsPatientAddressStreetOrMailingAddressJLabel, appointmentsPatientAddressStreetOrMailingAddressPanelConstraints);		appointmentsPatientAddressStreetOrMailingAddressPanelConstraints.weightx = 1;		appointmentsPatientAddressStreetOrMailingAddressPanelConstraints.gridx = 1;		appointmentsPatientAddressStreetOrMailingAddressPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressStreetOrMailingAddressJPanel.add(appointmentsPatientAddressStreetOrMailingAddressJTextField, appointmentsPatientAddressStreetOrMailingAddressPanelConstraints);		appointmentsPatientAddressStreetNameJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressStreetNameJTextField.setBorder(null);		appointmentsPatientAddressStreetNameJPanel.setOpaque(false);		appointmentsPatientAddressStreetNameJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressStreetNameJPanel.add(appointmentsPatientAddressStreetNameJLabel, appointmentsPatientAddressStreetNamePanelConstraints);		appointmentsPatientAddressStreetNamePanelConstraints.weightx = 1;		appointmentsPatientAddressStreetNamePanelConstraints.gridx = 1;		appointmentsPatientAddressStreetNamePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressStreetNameJPanel.add(appointmentsPatientAddressStreetNameJTextField, appointmentsPatientAddressStreetNamePanelConstraints);		appointmentsPatientAddressDwellingNumberJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressDwellingNumberJTextField.setBorder(null);		appointmentsPatientAddressDwellingNumberJPanel.setOpaque(false);		appointmentsPatientAddressDwellingNumberJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressDwellingNumberJPanel.add(appointmentsPatientAddressDwellingNumberJLabel, appointmentsPatientAddressDwellingNumberPanelConstraints);		appointmentsPatientAddressDwellingNumberPanelConstraints.weightx = 1;		appointmentsPatientAddressDwellingNumberPanelConstraints.gridx = 1;		appointmentsPatientAddressDwellingNumberPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressDwellingNumberJPanel.add(appointmentsPatientAddressDwellingNumberJTextField, appointmentsPatientAddressDwellingNumberPanelConstraints);		appointmentsPatientAddressCityJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressCityJTextField.setBorder(null);		appointmentsPatientAddressCityJPanel.setOpaque(false);		appointmentsPatientAddressCityJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressCityJPanel.add(appointmentsPatientAddressCityJLabel, appointmentsPatientAddressCityPanelConstraints);		appointmentsPatientAddressCityPanelConstraints.weightx = 1;		appointmentsPatientAddressCityPanelConstraints.gridx = 1;		appointmentsPatientAddressCityPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressCityJPanel.add(appointmentsPatientAddressCityJTextField, appointmentsPatientAddressCityPanelConstraints);		appointmentsPatientAddressStateOrProvinceJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressStateOrProvinceJTextField.setBorder(null);		appointmentsPatientAddressStateOrProvinceJPanel.setOpaque(false);		appointmentsPatientAddressStateOrProvinceJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressStateOrProvinceJPanel.add(appointmentsPatientAddressStateOrProvinceJLabel, appointmentsPatientAddressStateOrProvincePanelConstraints);		appointmentsPatientAddressStateOrProvincePanelConstraints.weightx = 1;		appointmentsPatientAddressStateOrProvincePanelConstraints.gridx = 1;		appointmentsPatientAddressStateOrProvincePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressStateOrProvinceJPanel.add(appointmentsPatientAddressStateOrProvinceJTextField, appointmentsPatientAddressStateOrProvincePanelConstraints);		appointmentsPatientAddressZipOrPostalCodeJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressZipOrPostalCodeJTextField.setBorder(null);		appointmentsPatientAddressZipOrPostalCodeJPanel.setOpaque(false);		appointmentsPatientAddressZipOrPostalCodeJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressZipOrPostalCodeJPanel.add(appointmentsPatientAddressZipOrPostalCodeJLabel, appointmentsPatientAddressZipOrPostalCodePanelConstraints);		appointmentsPatientAddressZipOrPostalCodePanelConstraints.weightx = 1;		appointmentsPatientAddressZipOrPostalCodePanelConstraints.gridx = 1;		appointmentsPatientAddressZipOrPostalCodePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressZipOrPostalCodeJPanel.add(appointmentsPatientAddressZipOrPostalCodeJTextField, appointmentsPatientAddressZipOrPostalCodePanelConstraints);		appointmentsPatientAddressCountryJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientAddressCountryJTextField.setBorder(null);		appointmentsPatientAddressCountryJPanel.setOpaque(false);		appointmentsPatientAddressCountryJPanel.setBorder(userInputLineBorder);		appointmentsPatientAddressCountryJPanel.add(appointmentsPatientAddressCountryJLabel, appointmentsPatientAddressCountryPanelConstraints);		appointmentsPatientAddressCountryPanelConstraints.weightx = 1;		appointmentsPatientAddressCountryPanelConstraints.gridx = 1;		appointmentsPatientAddressCountryPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAddressCountryJPanel.add(appointmentsPatientAddressCountryJTextField, appointmentsPatientAddressCountryPanelConstraints);		appointmentsAppointmentTypeJTextField.setBorder(null);		appointmentsAppointmentTypeJTextField.setForeground(SystemWindow.outputColor);		appointmentsAppointmentTypeJPanel.setOpaque(false);		appointmentsAppointmentTypeJPanel.setBorder(userInputLineBorder);		appointmentsAppointmentTypeJPanel.add(appointmentsAppointmentTypeJLabel, appointmentsAppointmentTypePanelConstraints);		appointmentsAppointmentTypePanelConstraints.weightx = 1;		appointmentsAppointmentTypePanelConstraints.gridx = 1;		appointmentsAppointmentTypePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsAppointmentTypeJPanel.add(appointmentsAppointmentTypeJTextField, appointmentsAppointmentTypePanelConstraints);		appointmentsPatientEmailJPanel.setOpaque(false);		appointmentsPatientEmailJPanel.setBorder(userInputLineBorder);		appointmentsPatientEmailJPanel.add(appointmentsPatientEmailJLabel, appointmentsPatientEmailPanelConstraints);		appointmentsPatientEmailPanelConstraints.weightx = 1;		appointmentsPatientEmailPanelConstraints.gridx = 1;		appointmentsPatientEmailPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientEmailJPanel.add(appointmentsPatientEmailJTextField, appointmentsPatientEmailPanelConstraints);		appointmentsPatientPhoneNumberJPanel.setOpaque(false);		appointmentsPatientPhoneNumberJPanel.setBorder(userInputLineBorder);		appointmentsPatientPhoneNumberJPanel.add(appointmentsPatientPhoneNumberJLabel, appointmentsPatientPhonePanelConstraints);		appointmentsPatientPhonePanelConstraints.weightx = 1;		appointmentsPatientPhonePanelConstraints.gridx = 1;		appointmentsPatientPhonePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientPhoneNumberJPanel.add(appointmentsPatientPhoneNumberJTextField, appointmentsPatientPhonePanelConstraints);		appointmentsPatientSexJTextField.setBorder(null);		appointmentsPatientSexJTextField.setForeground(SystemWindow.outputColor);		appointmentsPatientSexJPanel.setOpaque(false);		appointmentsPatientSexJPanel.setBorder(userInputLineBorder);		appointmentsPatientSexJPanel.add(appointmentsPatientSexJLabel, appointmentsPatientSexPanelConstraints);		appointmentsPatientSexPanelConstraints.weightx = 1;		appointmentsPatientSexPanelConstraints.gridx = 1;		appointmentsPatientSexPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientSexJPanel.add(appointmentsPatientSexJTextField, appointmentsPatientSexPanelConstraints);		appointmentsPaperJPanel.setSize(SystemWindow.paperSizeDimension);		appointmentsPaperJPanel.setPreferredSize(SystemWindow.paperSizeDimension);		appointmentsPaperJPanel.setMaximumSize(SystemWindow.paperSizeDimension);		appointmentsPaperJPanel.setMinimumSize(SystemWindow.paperSizeDimension);		appointmentsPaperJPanel.setBackground(Color.WHITE);		appointmentsPaperJPanel.setBorder(SystemWindow.paperBorder);		appointmentsPaperPanelConstraints.insets = new Insets(appointmentsPaperPanelMargin, appointmentsPaperPanelMargin, appointmentsPaperPanelMargin, appointmentsPaperPanelMargin);		appointmentsPaperPanelConstraints.gridy = 0;		appointmentsPaperPanelConstraints.weighty = 0;		appointmentsPaperPanelConstraints.fill = GridBagConstraints.NONE;		appointmentsPaperJPanel.add(appointmentsFormJPanel, appointmentsPaperPanelConstraints);		appointmentsPaperPanelConstraints.gridy = 1;		appointmentsPaperPanelConstraints.weighty = 1;		appointmentsPaperPanelConstraints.weightx = 1;		appointmentsPaperPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsPaperJPanel.add(appointmentsDayPanelPusherJPanel, appointmentsPaperPanelConstraints);		appointmentsPatientAppointmentDateJPanel.setOpaque(false);		appointmentsPatientAppointmentDateJPanel.setBorder(userInputLineBorder);		appointmentsPatientAppointmentDatePanelConstraints.gridy = 0;		appointmentsPatientAppointmentDatePanelConstraints.gridx = 0;		appointmentsPatientAppointmentDateJPanel.add(appointmentsPatientAppointmentDateJLabel, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsPatientAppointmentDatePanelConstraints.gridx++;		appointmentsPatientAppointmentDateJPanel.add(appointmentCalendarDayOfWeekJTextField, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsPatientAppointmentDatePanelConstraints.gridx++;		appointmentsPatientAppointmentDateJPanel.add(appointmentCalendarComma1AndSpaceJTextField, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsPatientAppointmentDatePanelConstraints.gridx++;		appointmentsPatientAppointmentDatePanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPatientAppointmentDatePanelConstraints.weightx = 1;		appointmentsPatientAppointmentDateJPanel.add(appointmentCalendarMonthJTextField, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsPatientAppointmentDatePanelConstraints.gridx++;		appointmentsPatientAppointmentDatePanelConstraints.fill = GridBagConstraints.NONE;		appointmentsPatientAppointmentDatePanelConstraints.weightx = 0;		appointmentsPatientAppointmentDateJPanel.add(appointmentCalendarDayOfMonthJTextField, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsPatientAppointmentDatePanelConstraints.gridx++;		appointmentsPatientAppointmentDateJPanel.add(appointmentCalendarComma2JTextField, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsPatientAppointmentDatePanelConstraints.gridx++;		appointmentsPatientAppointmentDateJPanel.add(appointmentCalendarYearJTextField, appointmentsPatientAppointmentDatePanelConstraints);		appointmentsFormJPanel.setBackground(Color.WHITE);		appointmentsPaperFormPanelConstraints.anchor = GridBagConstraints.NORTH;		appointmentsPaperFormPanelConstraints.weightx = 1;		appointmentsPaperFormPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = topLeftInsets;		appointmentsFormJPanel.add(appointmentsPatientAppointmentDateJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = topRightInsets;		appointmentsFormJPanel.add(appointmentsPatientAppointmentTimeJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 1;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsLengthJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 1;		appointmentsPaperFormPanelConstraints.insets = middleInsets;		appointmentsFormJPanel.add(appointmentsAppointmentTypeJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientSexJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 2;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsAppointmentProvidorsJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 3;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientGivenNameJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientMiddleInitialOrNameJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 4;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientFamilyNameJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientNameSuffixJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 5;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientPhoneNumberJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsFormJPanel.add(appointmentsPatientNameDegreeJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 6;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientSocialSecurityNumberJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientEmailJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 7;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientSocialSecurityNumberJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientEmailJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 8;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientAddressStreetOrMailingAddressJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientAddressStreetNameJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 9;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = leftNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientAddressStateOrProvinceJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormPanelConstraints.insets = rightNotTopNorBottomInsets;		appointmentsFormJPanel.add(appointmentsPatientAddressDwellingNumberJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridy = 10;		appointmentsPaperFormPanelConstraints.gridx = 0;		appointmentsPaperFormPanelConstraints.gridwidth = 2;		appointmentsPaperFormPanelConstraints.insets = bottomLeftInsets;		appointmentsFormJPanel.add(appointmentsPatientAddressCountryJPanel, appointmentsPaperFormPanelConstraints);		appointmentsPaperFormPanelConstraints.gridx = 2;		appointmentsPaperFormPanelConstraints.gridwidth = 1;		appointmentsPaperFormBaseJPanel.addMouseListener(this);		appointmentsPaperFormBasePanelConstraints.gridy = 0;		appointmentsPaperFormBasePanelConstraints.anchor = GridBagConstraints.WEST;		appointmentsPaperFormBasePanelConstraints.insets = new Insets(6, 6, 6, 6);		appointmentsPaperFormBaseJPanel.add(appointmentsPaperJPanel, appointmentsPaperFormBasePanelConstraints);		appointmentsPaperFormBasePanelScrollPaneBaseJPanel.setPreferredSize(appointmentsPaperFormBasePanelScrollPaneBasePanelDimension);		appointmentsPaperFormBasePanelScrollPaneBasePanelConstraints.weighty = 1;		appointmentsPaperFormBasePanelScrollPaneBasePanelConstraints.weightx = 1;		appointmentsPaperFormBasePanelScrollPaneBasePanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsPaperFormBasePanelScrollPaneBaseJPanel.add(appointmentsPaperFormBasePanelJScrollPane, appointmentsPaperFormBasePanelScrollPaneBasePanelConstraints);		appointmentsPaperFormBaseJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		appointmentsPaperFormBaseJPanel.setBorder(appointmentsPaperFormBasePanelBorder);		appointmentsPaperFormBaseJPanel.setName("appointmentsPaperFormBaseJPanel");		appointmentsHeaderJPanel.setBorder(appointmentsHeaderPanelBorder);		appointmentsHeaderJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		appointmentsHeaderPanelConstraints.anchor = GridBagConstraints.WEST;		appointmentsHeaderPanelConstraints.weighty = 1;		appointmentsHeaderPanelConstraints.weightx = 1;		appointmentsHeaderPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsHeaderPanelConstraints.gridy = 0;		appointmentsHeaderJPanel.add(appointmentsPaperFormBasePanelScrollPaneBaseJPanel, appointmentsHeaderPanelConstraints);		appointmentsJSplitPane.setUI(new BasicSplitPaneUI() {			public BasicSplitPaneDivider createDefaultDivider() {				return new BasicSplitPaneDivider(this) {					public void setBorder(Border b) {					}				};			}		});		appointmentsJSplitPane.setBorder(null);		appointmentsJSplitPane.setOpaque(false);		appointmentsJSplitPane.setLayout(new GridBagLayout());		appointmentsJSplitPane.add(appointmentsDayOfMonthViewingOptionJToggleButton);		appointmentsDayPanelBaseJPanel.add(appointmentsDayJPanel, appointmentsDayPanelBasePanelConstraints);		appointmentsDayJPanel.setSize(SystemWindow.paperSizeDimension);		appointmentsDayJPanel.setPreferredSize(SystemWindow.paperSizeDimension);		appointmentsDayPanelPusherJPanel.setOpaque(false);		monthCalendarMonthHeaderJLabel.setFont(new Font("arial", Font.PLAIN, 22));		appointmentsContentPanelScrollPaneCardedJPanel.add(appointmentsDayPanelBaseJPanel, "appointmentsDayPanelBaseJPanel");		appointmentsContentPanelScrollPaneCardedJPanel.add(appointmentsWeekJPanel, "appointmentsWeekJPanel");		appointmentsContentPanelScrollPaneCardedJPanel.add(appointmentsMonthJPanel, "appointmentsMonthJPanel");		appointmentsContentPanelJScrollPane.setHorizontalScrollBar(appointmentsContentPanelHorizontalJScrollbar);		appointmentsContentPanelJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);		appointmentsContentPanelJScrollPane.setVerticalScrollBar(appointmentsContentPanelVerticalJScrollbar);		appointmentsContentPanelJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);		appointmentsContentPanelConstraints.weightx = 1;		appointmentsContentPanelConstraints.weighty = 1;		appointmentsContentPanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsContentPanelJScrollPane.setBorder(null);		appointmentsContentPanelScrollPaneCardedPanelBaseJPanel.setBorder(new BevelBorder(BevelBorder.LOWERED));		appointmentsContentPanelScrollPaneCardedPanelBaseJPanel.setOpaque(false);		appointmentsButtonsJPanel.setBorder(new BevelBorder(BevelBorder.RAISED));		appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints.weightx = 1;		appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsContentPanelScrollPaneCardedPanelBaseJPanel.add(appointmentsButtonsJPanel, appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints);		appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints.gridy = 1;		appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints.weighty = 1;		appointmentsContentPanelScrollPaneCardedPanelBaseJPanel.add(appointmentsContentPanelJScrollPane, appointmentsContentPanelScrollPaneCardedPanelBasePanelConstraints);		appointmentsContentJPanel.add(appointmentsContentPanelScrollPaneCardedPanelBaseJPanel, appointmentsContentPanelConstraints);		rXNormCodeSetJButton.setLayout(new GridBagLayout());		hL7CodeSetJButton.setLayout(new GridBagLayout());		cPTCodeSetJButton.setLayout(new GridBagLayout());		iCDCodeSetJButton.setLayout(new GridBagLayout());		lOINCCodeSetJButton.setLayout(new GridBagLayout());		codeSetButtonPanelConstraints.anchor = GridBagConstraints.EAST;		codeSetButtonPanelConstraints.weightx = 0.5;		codeSetButtonPanelConstraints.insets = new Insets(0, 6, 0, 3);		rXNormCodeSetJButton.add(rXNormCodeSetAbbreviatedCodeButtonJLabel, codeSetButtonPanelConstraints);		hL7CodeSetJButton.add(hL7CodeSetAbbreviatedCodeButtonJLabel, codeSetButtonPanelConstraints);		cPTCodeSetJButton.add(cPTCodeSetAbbreviatedCodeButtonJLabel, codeSetButtonPanelConstraints);		iCDCodeSetJButton.add(iCDCodeSetAbbreviatedCodeButtonJLabel, codeSetButtonPanelConstraints);		lOINCCodeSetJButton.add(lOINCCodeSetAbbreviatedCodeButtonJLabel, codeSetButtonPanelConstraints);		codeSetButtonPanelConstraints.gridx = 1;		codeSetButtonPanelConstraints.anchor = GridBagConstraints.WEST;		codeSetButtonPanelConstraints.insets = new Insets(0, 3, 0, 6);		rXNormCodeSetJButton.add(rXNormCodeSetVersionButtonJLabel, codeSetButtonPanelConstraints);		hL7CodeSetJButton.add(hL7CodeSetVersionButtonJLabel, codeSetButtonPanelConstraints);		cPTCodeSetJButton.add(cPTCodeSetVersionButtonJLabel, codeSetButtonPanelConstraints);		iCDCodeSetJButton.add(iCDCodeSetVersionButtonJLabel, codeSetButtonPanelConstraints);		lOINCCodeSetJButton.add(lOINCCodeSetVersionButtonJLabel, codeSetButtonPanelConstraints);		codeSetButtonPanelConstraints.gridy = 1;		codeSetButtonPanelConstraints.gridx = 0;		codeSetButtonPanelConstraints.gridwidth = 2;		codeSetButtonPanelConstraints.anchor = GridBagConstraints.CENTER;		codeSetButtonPanelConstraints.insets = new Insets(0, 6, 0, 6);		rXNormCodeSetJButton.add(rXNormCodeSetCodeNameButtonJLabel, codeSetButtonPanelConstraints);		hL7CodeSetJButton.add(hL7CodeSetCodeNameButtonJLabel, codeSetButtonPanelConstraints);		cPTCodeSetJButton.add(cPTCodeSetCodeNameButtonJLabel, codeSetButtonPanelConstraints);		iCDCodeSetJButton.add(iCDCodeSetCodeNameButtonJLabel, codeSetButtonPanelConstraints);		lOINCCodeSetJButton.add(lOINCCodeSetCodeNameButtonJLabel, codeSetButtonPanelConstraints);		rXNormCodeSetJButton.setMnemonic('H');		rXNormCodeSetJButton.addActionListener(this);		rXNormCodeSetJButton.setActionCommand("rXNormCodeSetJButton");		hL7CodeSetJButton.setMnemonic('H');		hL7CodeSetJButton.addActionListener(this);		hL7CodeSetJButton.setActionCommand("hL7CodeSetJButton");		lOINCCodeSetJButton.setMnemonic('L');		lOINCCodeSetJButton.addActionListener(this);		lOINCCodeSetJButton.setActionCommand("lOINCCodeSetJButton");		cPTCodeSetJButton.setMnemonic('C');		cPTCodeSetJButton.addActionListener(this);		cPTCodeSetJButton.setActionCommand("cPTCodeSetJButton");		iCDCodeSetJButton.setMnemonic('I');		iCDCodeSetJButton.addActionListener(this);		iCDCodeSetJButton.setActionCommand("iCDCodeSetJButton");		codeSetPanelConstraints.weighty = 1;		codeSetPanelConstraints.weightx = 1;		codeSetPanelConstraints.fill = GridBagConstraints.BOTH;		viewMedicalCodesButtonsJPanel.setBackground(SystemWindow.quintessentialThemeColor);		viewMedicalCodesButtonsPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		viewMedicalCodesButtonsPanelConstraints.insets = new Insets(6, 6, 3, 3);		viewMedicalCodesButtonsJPanel.add(hL7CodeSetJButton, viewMedicalCodesButtonsPanelConstraints);		viewMedicalCodesButtonsPanelConstraints.gridx = 1;		viewMedicalCodesButtonsPanelConstraints.insets = new Insets(6, 3, 3, 6);		viewMedicalCodesButtonsJPanel.add(cPTCodeSetJButton, viewMedicalCodesButtonsPanelConstraints);		viewMedicalCodesButtonsPanelConstraints.gridy = 1;		viewMedicalCodesButtonsPanelConstraints.gridx = 0;		viewMedicalCodesButtonsPanelConstraints.insets = new Insets(3, 6, 6, 3);		viewMedicalCodesButtonsJPanel.add(iCDCodeSetJButton, viewMedicalCodesButtonsPanelConstraints);		viewMedicalCodesButtonsPanelConstraints.gridx = 1;		viewMedicalCodesButtonsPanelConstraints.insets = new Insets(3, 3, 6, 6);		viewMedicalCodesButtonsJPanel.add(lOINCCodeSetJButton, viewMedicalCodesButtonsPanelConstraints);		viewMedicalCodesButtonsPanelConstraints.gridx = 2;		viewMedicalCodesButtonsJPanel.add(rXNormCodeSetJButton, viewMedicalCodesButtonsPanelConstraints);		viewMedicalCodesButtonsPanelConstraints.gridy = 2;		viewMedicalCodesButtonsPanelConstraints.gridx = 0;		viewMedicalCodesButtonsPanelConstraints.anchor = GridBagConstraints.WEST;		JPanel viewMedicalCodesQueryJPanel = new JPanel(new GridBagLayout());		GridBagConstraints viewMedicalCodesQueryPanelConstraints = new GridBagConstraints();		viewMedicalCodesQueryJPanel.setOpaque(false);		viewMedicalCodesQueryJPanel.add(stringToFindInCodeSetJLabel, viewMedicalCodesQueryPanelConstraints);		viewMedicalCodesQueryPanelConstraints.gridx = 1;		viewMedicalCodesQueryJPanel.add(queryToFindInCodeSetJTextField, viewMedicalCodesQueryPanelConstraints);		viewMedicalCodesButtonsPanelConstraints.gridx = 0;		viewMedicalCodesButtonsPanelConstraints.gridwidth = 3;		viewMedicalCodesButtonsPanelConstraints.anchor = GridBagConstraints.CENTER;		viewMedicalCodesButtonsJPanel.add(viewMedicalCodesQueryJPanel, viewMedicalCodesButtonsPanelConstraints);		viewMedicalCodesCardedJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		rXNormCodeSetJPanel.setOpaque(false);		hL7CodeSetJPanel.setOpaque(false);		lOINCCodeSetJPanel.setOpaque(false);		cPTCodeSetJPanel.setOpaque(false);		iCDCodeSetJPanel.setOpaque(false);		noCodesJLabel.setFont(SystemWindow.systemFont);		noCodesJLabel.setForeground(Color.WHITE);		tooManyCodesJLabel.setFont(SystemWindow.systemFont);		tooManyCodesJLabel.setForeground(Color.WHITE);		blankCodeSetCoverJPanel.setBackground(Color.BLACK);		viewMedicalCodesCardedJPanel.setBorder(SystemWindow.mainContentPanelBorder);		viewMedicalCodesCardedJPanel.add(blankCodeSetCoverJPanel, "blankCodeSetCoverJPanel");		viewMedicalCodesCardedJPanel.add(rXNormCodeSetJPanel, "rXNormCodeSetJPanel");		viewMedicalCodesCardedJPanel.add(hL7CodeSetJPanel, "hL7CodeSetJPanel");		viewMedicalCodesCardedJPanel.add(lOINCCodeSetJPanel, "lOINCCodeSetJPanel");		viewMedicalCodesCardedJPanel.add(cPTCodeSetJPanel, "cPTCodeSetJPanel");		viewMedicalCodesCardedJPanel.add(iCDCodeSetJPanel, "iCDCodeSetJPanel");		viewMedicalCodesPanelConstraints.weightx = 1;		viewMedicalCodesPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		viewMedicalCodesJPanel.add(viewMedicalCodesButtonsJPanel, viewMedicalCodesPanelConstraints);		viewMedicalCodesPanelConstraints.gridy = 1;		viewMedicalCodesPanelConstraints.weighty = 1;		viewMedicalCodesPanelConstraints.fill = GridBagConstraints.BOTH;		viewMedicalCodesJPanel.add(viewMedicalCodesCardedJPanel, viewMedicalCodesPanelConstraints);		GridBagConstraints mainCardedBasePanelConstraints = new GridBagConstraints();		mainCardedBasePanelConstraints.weighty = 1;		mainCardedBasePanelConstraints.weightx = 1;		mainCardedBasePanelConstraints.fill = GridBagConstraints.BOTH;		mainCardedBaseJPanel.add(mainCardedJPanel, mainCardedBasePanelConstraints);		JPanel mainCardedBlankJPanel = new JPanel(new GridBagLayout());		mainCardedBlankJPanel.setBorder(new CompoundBorder(new CompoundBorder(new BevelBorder(BevelBorder.RAISED), new LineBorder(SystemWindow.quintessentialThemeColor, 12)), new BevelBorder(BevelBorder.LOWERED)));		mainCardedBlankJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		mainCardedJPanel.setBackground(SystemWindow.quintessentialThemeColor);		mainCardedBaseJPanel.setBackground(SystemWindow.quintessentialThemeColor);		patientIndexPrintPageJButton.addActionListener(this);		patientIndexPrintPageJButton.setActionCommand("patientIndexPrintPageJButton");		patientIndexPrintPageJButton.setFont(SystemWindow.systemFont);		patientIndexPrintAllJButton.addActionListener(this);		patientIndexPrintAllJButton.setActionCommand("patientIndexPrintAllJButton");		patientIndexPrintAllJButton.setFont(SystemWindow.systemFont);		patientIndexButtonsPanelConstraints.gridx = 0;		patientIndexButtonsPanelConstraints.insets = new Insets(9, 9, 9, 9);		patientIndexButtonsJPanel.setBackground(SystemWindow.quintessentialThemeColor);		patientIndexButtonsJPanel.add(patientIndexPrintPageJButton, patientIndexButtonsPanelConstraints);		patientIndexButtonsPanelConstraints.gridx = 1;		patientIndexButtonsJPanel.add(patientIndexPrintAllJButton, patientIndexButtonsPanelConstraints);		patientIndexJPanel.setOpaque(false);		patientIndexPanelConstraints.weightx = 1;		patientIndexPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		patientIndexJPanel.add(patientIndexButtonsJPanel, patientIndexPanelConstraints);		patientIndexPanelConstraints.gridy = 1;		patientIndexPanelConstraints.weighty = 1;		patientIndexPanelConstraints.fill = GridBagConstraints.BOTH;		patientIndexJPanel.add(patientIndexJScrollPane, patientIndexPanelConstraints);		patientIndexScrollPaneJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		patientIndexJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);		patientIndexJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);		schedulingJPanel.setBackground(SystemWindow.quintessentialThemeColor);		appointmentsSplitPaneBasePanelConstraints.weighty = 1;		appointmentsSplitPaneBasePanelConstraints.weightx = 1;		appointmentsSplitPaneBasePanelConstraints.fill = GridBagConstraints.BOTH;		appointmentsSplitPaneBaseJPanel.add(appointmentsJSplitPane, appointmentsSplitPaneBasePanelConstraints);		appointmentsSplitPaneBaseJPanel.setBackground(new Color(122, 122, 122));		recordOfLoginsJToggleButton.setMnemonic('L');		recordOfLoginsJToggleButton.addActionListener(this);		recordOfLoginsJToggleButton.setActionCommand("recordOfLoginsJToggleButton");		reportsPanelButtonsJPanel.add(recordOfLoginsJToggleButton, reportsPanelButtonsPanelConstraints);		reportsJPanel.setOpaque(false);		reportsJPanel.add(reportsPanelButtonsJPanel, reportsPanelConstraints);		networkFilesPanelConstraints.weighty = 1;		networkFilesPanelConstraints.weightx = 1;		networkFilesPanelConstraints.fill = GridBagConstraints.BOTH;		networkFilesJPanel.add(outputNetworkFilesJPanel, networkFilesPanelConstraints);		networkFilesPanelConstraints.gridy = 1;		networkFilesJPanel.add(inputNetworkFilesJPanel, networkFilesPanelConstraints);		mainCardedJPanel.add(mainCardedBlankJPanel, "mainCardedBlankJPanel");		mainCardedJPanel.add(patientIndexJPanel, "patientIndexJPanel");		mainCardedJPanel.add(schedulingJPanel, "schedulingJPanel");		mainCardedJPanel.add(networkFilesJPanel, "billingJPanel");		mainCardedJPanel.add(reportsJPanel, "reportsJPanel");		mainCardedJPanel.add(appointmentsSplitPaneBaseJPanel, "appointmentsSplitPaneBaseJPanel");		mainCardedJPanel.add(viewMedicalCodesJPanel, "viewMedicalCodesJPanel");	}	private void componentSizer(JComponent jComponent, Dimension dimension, Integer height, String param) {		if (param.equals("ALL")) {			jComponent.setPreferredSize(dimension);			jComponent.setSize(dimension);			jComponent.setMinimumSize(dimension);			jComponent.setMaximumSize(dimension);		} else if (param.equals("LIMIT_HEIGHT_ONLY")) {			dimension = new Dimension(1, height);			jComponent.setPreferredSize(dimension);			jComponent.setMaximumSize(dimension);		}	}	public JPanel appointments(String timeRange, Vector<String> usersToReturnAppointmentsFor, int calendarDay, int calendarYear) {		JPanel marginedAppointmentsJPanel = new JPanel(new GridBagLayout());		GridBagConstraints marginedAppointmentScheduleReportPanelConstraints = new GridBagConstraints();		Calendar userCalendar;		JPanel appointmentScheduleReportJPanel = new JPanel(new GridBagLayout());		JPanel appointmentScheduleReportPanelPusherJPanel = new JPanel(new GridBagLayout());		GridBagConstraints appointmentScheduleReportPanelConstraints = new GridBagConstraints();		Color calendarBlueColor = new Color(78, 91, 130);		appointmentScheduleReportJPanel.setBackground(calendarBlueColor);		Vector<Vector<Object>> usersAppointmentsOnCalendarDay = getAppointmentsForSelectedUsersAndCalendarDay(usersToReturnAppointmentsFor, calendarDay, calendarYear);		int numUsersAppointmentsOnCalendarDay = usersAppointmentsOnCalendarDay.size();		int appointmentInd = 0;		System.out.println("usersAppointmentsOnCalendarDay.size(): " + usersAppointmentsOnCalendarDay.size());		if (usersAppointmentsOnCalendarDay.isEmpty() && timeRange.equals("MONTH_DAY")) {			return null;		} else {			if (timeRange.equals("DAY") || timeRange.equals("MONTH_DAY")) {				int lineCount = 0;				int lineMax = 40;				while (appointmentInd < numUsersAppointmentsOnCalendarDay) {					System.out.println("appointmentInd: " + appointmentInd);					if (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).size() > 1) {						System.out.println("returning appointments for day " + calendarDay + " and year " + calendarYear);						userCalendar = (Calendar) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(1));						JLabel appointmentScheduleProvidorJLabel = new JLabel("Mayonaisse Health Clinic");						JLabel appointmentScheduleReportHeaderJLabel = new JLabel("Appointment Schedule");						JLabel appointmentScheduleUserNameScheduleJLabel = new JLabel("Will.I.Am");						JLabel appointmentScheduleDateJLabel = new JLabel(dayOfWeek[userCalendar.get(userCalendar.DAY_OF_WEEK) - 1] + ", " + month[userCalendar.get(userCalendar.MONTH)] + " " + userCalendar.get(userCalendar.DAY_OF_MONTH) + ", " + userCalendar.get(userCalendar.YEAR));						JLabel appointmentScheduleEmptyLineJLabel = new JLabel();						appointmentScheduleProvidorJLabel.setFont(new Font("arial", Font.BOLD + Font.ITALIC, 17));						appointmentScheduleReportHeaderJLabel.setFont(new Font("arial", Font.BOLD, 17));						appointmentScheduleUserNameScheduleJLabel.setFont(new Font("arial", Font.PLAIN, 14));						JLabel appointmentScheduleAppointmentTimeColumnHeaderJLabel = new JLabel("Time: ");						JLabel appointmentScheduleAppointmentLengthColumnHeaderJLabel = new JLabel(" Length: ");						JLabel appointmentSchedulePatientNameColumnHeaderJLabel = new JLabel(" Patient: ");						JLabel appointmentScheduleChartIDColumnHeaderJLabel = new JLabel(" ChartID: ");						JLabel appointmentScheduleAppointmentTypeColumnHeaderJLabel = new JLabel(" Type: ");						JLabel appointmentSchedulePatientPhoneColumnHeaderJLabel = new JLabel(" Patient Phone: ");						JLabel appointmentScheduleUserWhoAddedColumnHeaderJLabel = new JLabel(" User: ");						JLabel appointmentScheduleWhenAddedColumnHeaderJLabel = new JLabel(" Added: ");						appointmentScheduleAppointmentTimeColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentScheduleAppointmentLengthColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentSchedulePatientNameColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentScheduleChartIDColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentScheduleAppointmentTypeColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentSchedulePatientPhoneColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentScheduleUserWhoAddedColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentScheduleWhenAddedColumnHeaderJLabel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(92, 92, 92)));						appointmentScheduleReportJPanel.setBackground(Color.WHITE);						appointmentScheduleReportJPanel.setOpaque(true);						appointmentScheduleReportPanelConstraints.gridwidth = 8;						appointmentScheduleReportPanelConstraints.anchor = GridBagConstraints.CENTER;						appointmentScheduleReportJPanel.add(appointmentScheduleProvidorJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridy = 1;						appointmentScheduleReportJPanel.add(appointmentScheduleReportHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridy = 2;						appointmentScheduleReportJPanel.add(appointmentScheduleUserNameScheduleJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridy = 3;						appointmentScheduleReportJPanel.add(appointmentScheduleDateJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridy = 4;						appointmentScheduleReportPanelConstraints.weightx = 1;						appointmentScheduleReportPanelConstraints.fill = GridBagConstraints.BOTH;						appointmentScheduleReportJPanel.add(appointmentScheduleEmptyLineJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.weightx = 0;						appointmentScheduleReportPanelConstraints.gridy = 5;						appointmentScheduleReportPanelConstraints.gridx = 0;						appointmentScheduleReportPanelConstraints.anchor = GridBagConstraints.WEST;						appointmentScheduleReportPanelConstraints.gridwidth = 1;						appointmentScheduleReportJPanel.add(appointmentScheduleAppointmentTimeColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 1;						appointmentScheduleReportJPanel.add(appointmentScheduleAppointmentLengthColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 2;						appointmentScheduleReportJPanel.add(appointmentSchedulePatientNameColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 3;						appointmentScheduleReportJPanel.add(appointmentScheduleChartIDColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 4;						appointmentScheduleReportJPanel.add(appointmentScheduleAppointmentTypeColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 5;						appointmentScheduleReportJPanel.add(appointmentSchedulePatientPhoneColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 6;						appointmentScheduleReportJPanel.add(appointmentScheduleUserWhoAddedColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						appointmentScheduleReportPanelConstraints.gridx = 7;						appointmentScheduleReportJPanel.add(appointmentScheduleWhenAddedColumnHeaderJLabel, appointmentScheduleReportPanelConstraints);						JLabel columnJLabel1;						JLabel columnJLabel2;						JLabel columnJLabel3;						JLabel columnJLabel4;						JLabel columnJLabel5;						JLabel columnJLabel6;						JLabel columnJLabel7;						JLabel columnJLabel8;						appointmentScheduleReportPanelConstraints.insets = new Insets(5, 2, 0, 2);						int userIDInd = 0;						while (!(lineCount > lineMax) && appointmentInd < numUsersAppointmentsOnCalendarDay) {							System.out.println("daily scedule found using calendarDay " + calendarDay + ", and calendarYear, " + calendarYear);							lineCount++;							userCalendar = (Calendar) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(1));							String appointmentTime = userCalendar.get(userCalendar.HOUR) + ":" + userCalendar.get(userCalendar.MINUTE) + " " + aMPM[userCalendar.get(userCalendar.AM_PM)];							String appointmentProvidor = (String) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(3));							String appointmentPatientName = (String) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(4));							String appointmentLength = (String) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(5));							String appointmentChartID = (String) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(6));							String appointmentType = (String) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(7));							String appointmentPatientPhone = (String) (usersAppointmentsOnCalendarDay.elementAt(appointmentInd).elementAt(8));							appointmentScheduleReportPanelConstraints.gridy = appointmentInd + 6;							appointmentScheduleReportPanelConstraints.gridx = 0;							columnJLabel1 = new JLabel(appointmentTime);							columnJLabel2 = new JLabel(appointmentLength);							columnJLabel3 = new JLabel(appointmentPatientName);							columnJLabel4 = new JLabel(appointmentLength);							columnJLabel5 = new JLabel(appointmentChartID);							columnJLabel6 = new JLabel(appointmentType);							columnJLabel7 = new JLabel(appointmentPatientPhone);							columnJLabel8 = new JLabel("added");							columnJLabel2.setOpaque(true);							columnJLabel4.setOpaque(true);							columnJLabel6.setOpaque(true);							columnJLabel8.setOpaque(true);							columnJLabel2.setBackground(new Color(232, 232, 232));							columnJLabel4.setBackground(new Color(232, 232, 232));							columnJLabel6.setBackground(new Color(232, 232, 232));							columnJLabel8.setBackground(new Color(232, 232, 232));							appointmentScheduleReportPanelConstraints.gridx = 0;							appointmentScheduleReportJPanel.add(columnJLabel1, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 1;							appointmentScheduleReportJPanel.add(columnJLabel2, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 2;							appointmentScheduleReportJPanel.add(columnJLabel3, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 3;							appointmentScheduleReportJPanel.add(columnJLabel4, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 4;							appointmentScheduleReportJPanel.add(columnJLabel5, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 5;							appointmentScheduleReportJPanel.add(columnJLabel6, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 6;							appointmentScheduleReportJPanel.add(columnJLabel7, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.gridx = 7;							appointmentScheduleReportJPanel.add(columnJLabel8, appointmentScheduleReportPanelConstraints);							appointmentScheduleReportPanelConstraints.insets = new Insets(0, 2, 0, 2);							appointmentInd++;						}					} else {						appointmentInd++;					}				}			} else if (timeRange.equals("WEEK")) {				String[] weekdayString = new String[8];				weekdayString[1] = "Sun";				weekdayString[2] = "Mon";				weekdayString[3] = "Tue";				weekdayString[4] = "Wed";				weekdayString[5] = "Thu";				weekdayString[6] = "Fri";				weekdayString[7] = "Sat";				int ind = 1;				while (ind < 8) {					JPanel dayBoxJPanel = new JPanel();					GridBagConstraints dayBoxPanelConstraints = new GridBagConstraints();					dayBoxJPanel.add(new JLabel(weekdayString[ind]), dayBoxPanelConstraints);					dayBoxPanelConstraints.gridy = 1;					dayBoxJPanel.add(new JLabel(" "), dayBoxPanelConstraints);					appointmentScheduleReportPanelConstraints.weighty = 1;					appointmentScheduleReportPanelConstraints.weightx = 1;					appointmentScheduleReportJPanel.add(dayBoxJPanel, appointmentScheduleReportPanelConstraints);					ind++;				}			} else if (timeRange.equals("MONTH")) {				monthCalendarMonthHeaderJLabel.setText(month[monthCalendar.get(monthCalendar.MONTH)] + ", " + monthCalendar.get(monthCalendar.YEAR));				JPanel appointmentsPanel;				JButton dayInCalendarJButton;				Dimension dayInCalendarDimension = new Dimension(110, 110);				int dayOfMonth = monthCalendar.get(monthCalendar.DAY_OF_MONTH);				int dayOfWeekInMonthInd = monthCalendar.get(monthCalendar.DAY_OF_WEEK);				int dayOfMonthInd = monthCalendar.get(monthCalendar.DAY_OF_MONTH);				while (dayOfMonthInd != 0) {					if (dayOfWeekInMonthInd == 1) {						dayOfWeekInMonthInd = 8;					}					dayOfWeekInMonthInd--;					dayOfMonthInd--;				}				int cellIndWhereTheMonthStarts = dayOfWeekInMonthInd;				int numDaysInMonth = monthCalendar.getActualMaximum(monthCalendar.DAY_OF_MONTH);				int cellIndWhereTheMonthEnds = numDaysInMonth + cellIndWhereTheMonthStarts - 1;				System.out.println("cellIndWhereTheMonthStarts: " + cellIndWhereTheMonthStarts);				System.out.println("cellIndWhereTheMonthEnds: " + cellIndWhereTheMonthEnds);				JLabel dayTheWeekHeaderJLabel[] = new JLabel[7];				JPanel[] cellJPanel = new JPanel[300];				GridBagConstraints cellTextAreaConstraints = new GridBagConstraints();				Color skyBlueColor = new Color(222, 222, 255);				int cellInd = 0;				appointmentScheduleReportPanelConstraints.gridy = 0;				appointmentScheduleReportPanelConstraints.gridx = 0;				dayTheWeekHeaderJLabel[0] = new JLabel("Sun");				dayTheWeekHeaderJLabel[1] = new JLabel("Mon");				dayTheWeekHeaderJLabel[2] = new JLabel("Tue");				dayTheWeekHeaderJLabel[3] = new JLabel("Wed");				dayTheWeekHeaderJLabel[4] = new JLabel("Thu");				dayTheWeekHeaderJLabel[5] = new JLabel("Fri");				dayTheWeekHeaderJLabel[6] = new JLabel("Sat");				int indle = 0;				while (indle < dayTheWeekHeaderJLabel.length) {					dayTheWeekHeaderJLabel[indle].setFont(new Font("Electron", Font.BOLD, 32));					dayTheWeekHeaderJLabel[indle].setForeground(Color.WHITE);					appointmentScheduleReportJPanel.add(dayTheWeekHeaderJLabel[indle], appointmentScheduleReportPanelConstraints);					appointmentScheduleReportPanelConstraints.gridx++;					indle++;				}				appointmentScheduleReportPanelConstraints.gridy = 1;				while (appointmentScheduleReportPanelConstraints.gridy < 7) {					appointmentScheduleReportPanelConstraints.gridx = 0;					while (appointmentScheduleReportPanelConstraints.gridx < 7) {						cellJPanel[cellInd] = new JPanel(new GridBagLayout());						cellJPanel[cellInd].setSize(new Dimension(dayInCalendarDimension.width, dayInCalendarDimension.height));						cellJPanel[cellInd].setPreferredSize(dayInCalendarDimension);						cellJPanel[cellInd].setFont(new Font("Electron", Font.BOLD, 17));						if (!(cellInd < cellIndWhereTheMonthStarts || cellInd > cellIndWhereTheMonthEnds)) {							dayInCalendarJButton = new JButton();							System.out.println("month day called for calendarDay " + calendarDay + ", calendarYear " + calendarYear);							int ind = 0;							while (ind < selectedAppointmentProviders.size()) {								System.out.println("selectedAppointmentProviders.elementAt(" + ind + "): " + selectedAppointmentProviders.elementAt(ind));								ind++;							}							appointmentsPanel = appointments("MONTH_DAY", selectedAppointmentProviders, calendarDay, calendarYear);							calendarDay++;							JLabel dayOfTheMonthJLabel = new JLabel(String.valueOf(cellInd));							cellTextAreaConstraints.gridy = 0;							cellTextAreaConstraints.gridx = 0;							cellTextAreaConstraints.weighty = 0;							cellTextAreaConstraints.weightx = 0;							cellTextAreaConstraints.anchor = GridBagConstraints.NORTHEAST;							cellTextAreaConstraints.fill = GridBagConstraints.NONE;							cellJPanel[cellInd].add(dayOfTheMonthJLabel, cellTextAreaConstraints);							if (appointmentsPanel != null) {								add(appointmentsPanel);								validate();								dayInCalendarJButton.setIcon(iconifyComponent(appointmentsPanel, dayInCalendarDimension.width, dayInCalendarDimension.height));								cellTextAreaConstraints.weighty = 1;								cellTextAreaConstraints.weightx = 1;								cellTextAreaConstraints.anchor = GridBagConstraints.CENTER;								cellTextAreaConstraints.fill = GridBagConstraints.BOTH;								dayInCalendarJButton.setIcon(iconifyComponent(appointmentsPanel, dayInCalendarDimension.width, dayInCalendarDimension.height));								cellJPanel[cellInd].add(dayInCalendarJButton, cellTextAreaConstraints);								remove(appointmentsPanel);							}						}						int width = 5;						Color borderColor = new Color(78, 91, 80);						if (appointmentScheduleReportPanelConstraints.gridy == 1) {							if (cellInd == cellIndWhereTheMonthStarts) {								if (appointmentScheduleReportPanelConstraints.gridx == 6) {									cellJPanel[cellInd].setBorder(new MatteBorder(width, width, 0, width, borderColor));								} else if (appointmentScheduleReportPanelConstraints.gridx == 0) {									cellJPanel[cellInd].setBorder(new MatteBorder(width, width, 0, 0, borderColor));								}							} else if (cellInd > cellIndWhereTheMonthStarts) {								if (appointmentScheduleReportPanelConstraints.gridx == 6) {									cellJPanel[cellInd].setBorder(new MatteBorder(width, 0, 0, width, borderColor));								} else {									cellJPanel[cellInd].setBorder(new MatteBorder(width, 0, 0, 0, borderColor));								}							} else {								cellJPanel[cellInd].setBorder(new MatteBorder(0, 0, width, 0, borderColor));							}						} else if (((cellInd + 6 - appointmentScheduleReportPanelConstraints.gridx) >= cellIndWhereTheMonthEnds) && (!((cellInd + 6 - appointmentScheduleReportPanelConstraints.gridx) >= cellIndWhereTheMonthEnds + 7))) {							if (appointmentScheduleReportPanelConstraints.gridx == 0) {								if (cellInd == cellIndWhereTheMonthEnds) {									cellJPanel[cellInd].setBorder(new MatteBorder(0, width, width, width, borderColor));								} else if (!(cellInd > cellIndWhereTheMonthEnds)) {									cellJPanel[cellInd].setBorder(new MatteBorder(0, width, width, 0, borderColor));								}							} else if (cellInd == cellIndWhereTheMonthEnds) {								cellJPanel[cellInd].setBorder(new MatteBorder(0, 0, width, width, borderColor));							} else if (!(cellInd < cellIndWhereTheMonthStarts || cellInd > cellIndWhereTheMonthEnds)) {								cellJPanel[cellInd].setBorder(new MatteBorder(0, 0, width, 0, borderColor));							} else if (!((cellInd - 7) < cellIndWhereTheMonthStarts || (cellInd - 7) > cellIndWhereTheMonthEnds)) {								cellJPanel[cellInd].setBorder(new MatteBorder(width, 0, 0, 0, borderColor));							}						} else {							if (appointmentScheduleReportPanelConstraints.gridx == 0 && cellInd <= cellIndWhereTheMonthEnds) {								cellJPanel[cellInd].setBorder(new MatteBorder(0, width, 0, 0, borderColor));							} else if (appointmentScheduleReportPanelConstraints.gridx == 6 && cellInd < cellIndWhereTheMonthEnds) {								cellJPanel[cellInd].setBorder(new MatteBorder(0, 0, 0, width, borderColor));							}						}						if (cellInd < cellIndWhereTheMonthStarts || cellInd > cellIndWhereTheMonthEnds) {							cellJPanel[cellInd].setBackground(new Color(176, 176, 176));						} else {							if (appointmentScheduleReportPanelConstraints.gridx == 0 || appointmentScheduleReportPanelConstraints.gridx == 2 || appointmentScheduleReportPanelConstraints.gridx == 4 || appointmentScheduleReportPanelConstraints.gridx == 6) {								cellJPanel[cellInd].setBackground(skyBlueColor);							} else {								cellJPanel[cellInd].setBackground(Color.WHITE);							}							if (appointmentScheduleReportPanelConstraints.gridy == 2 || appointmentScheduleReportPanelConstraints.gridy == 4 || appointmentScheduleReportPanelConstraints.gridy == 6) {								int r = (int) (cellJPanel[cellInd].getBackground().getRed() * .86);								int g = (int) (cellJPanel[cellInd].getBackground().getGreen() * .86);								int b = (int) (cellJPanel[cellInd].getBackground().getBlue() * .86);								cellJPanel[cellInd].setBackground(new Color(r, g, b));							}						}						appointmentScheduleReportPanelConstraints.weighty = 1;						appointmentScheduleReportPanelConstraints.weightx = 1;						appointmentScheduleReportPanelConstraints.fill = GridBagConstraints.BOTH;						appointmentScheduleReportJPanel.add(cellJPanel[cellInd], appointmentScheduleReportPanelConstraints);						cellInd++;						appointmentScheduleReportPanelConstraints.gridx++;					}					appointmentScheduleReportPanelConstraints.gridy++;				}			}			marginedAppointmentsJPanel.setBackground(Color.WHITE);			marginedAppointmentsJPanel.setBorder(new CompoundBorder(new MatteBorder(2, 2, 0, 0, Color.BLACK), new MatteBorder(0, 0, 2, 2, Color.BLACK)));			marginedAppointmentScheduleReportPanelConstraints.insets = new Insets(6, 6, 6, 6);			if (timeRange.equals("MONTH")) {				marginedAppointmentsJPanel.add(monthCalendarMonthHeaderJLabel, marginedAppointmentScheduleReportPanelConstraints);				marginedAppointmentScheduleReportPanelConstraints.gridy = 1;			} else {			}			appointmentScheduleReportPanelPusherJPanel.setOpaque(false);			appointmentScheduleReportPanelConstraints.gridy++;			appointmentScheduleReportPanelConstraints.weighty = 1;			appointmentScheduleReportPanelConstraints.weightx = 1;			appointmentScheduleReportPanelConstraints.fill = GridBagConstraints.BOTH;			appointmentScheduleReportJPanel.add(appointmentScheduleReportPanelPusherJPanel, appointmentScheduleReportPanelConstraints);			marginedAppointmentsJPanel.add(appointmentScheduleReportJPanel, marginedAppointmentScheduleReportPanelConstraints);			return marginedAppointmentsJPanel;		}	}	public void popupProvidorChoicesJPopupMenu(String showProvidorsOrCreateGroup) {		MatteBorder verticalLineBorder = new MatteBorder(0, 1, 0, 1, Color.GRAY);		JPanel verticalLineJPanel = new JPanel(new GridBagLayout());		verticalLineJPanel.setBorder(verticalLineBorder);		String providerID;		Vector<Object> providerInformation;		JToggleButton providorGroupJToggleButton;		Vector<String> facilitiesAssociatedWithProvider;		String providerFacility;		rootPracticeAppointments = (Vector<Vector<Vector<Vector<Object>>>>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(1));		rootPracticeUserGroups = (Vector<Vector<String>>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(0));		GridBagConstraints providerButtonConstraints = new GridBagConstraints();		GridBagConstraints appointmentProvidorsPopupMenuPanelConstraints = new GridBagConstraints();		int providorInd = 0;		int numProviders = rootPracticeAppointments.size();		JToggleButton providorJToggleButton;		JLabel providorNameJLabel;		JLabel providorFacilityJLabel;		JLabel providorIDJLabel;		appointmentProvidorsPopupMenuPanelConstraints.insets = new Insets(6, 6, 0, 6);		appointmentProvidorsPopupMenuJPanel.removeAll();		JLabel selectProviderIndividualsPromptJLabel = new JLabel("Individual providers: ");		JLabel selectProviderGroupsPromptJLabel = new JLabel("Provider groups: ");		JLabel addProviderOrProvidorGroupPromptJLabel = new JLabel("(Click to add provider or group):");		JPanel selectProvidersHeaderJPanel = new JPanel(new GridBagLayout());		GridBagConstraints selectProvidersHeaderPanelConstraints = new GridBagConstraints();		selectProvidersHeaderJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		selectProvidersHeaderJPanel.setBorder(SystemWindow.panelBorder);		selectProvidersHeaderJPanel.add(selectProviderIndividualsPromptJLabel, selectProvidersHeaderPanelConstraints);		selectProvidersHeaderPanelConstraints.gridx = 1;		selectProvidersHeaderJPanel.add(selectProviderGroupsPromptJLabel, selectProvidersHeaderPanelConstraints);		selectProvidersHeaderPanelConstraints.gridy = 1;		selectProvidersHeaderPanelConstraints.gridx = 0;		selectProvidersHeaderPanelConstraints.gridwidth = 2;		selectProvidersHeaderJPanel.add(addProviderOrProvidorGroupPromptJLabel, selectProvidersHeaderPanelConstraints);		if (showProvidorsOrCreateGroup.equals("CREATE_GROUP")) {			JPanel newProviderGroupNameJPanel = new JPanel(new GridBagLayout());			newProviderGroupNameJPanel.setBorder(SystemWindow.panelBorder);			GridBagConstraints newProviderGroupNamePanelConstraints = new GridBagConstraints();			JLabel newProvidorGroupNameJLabel = new JLabel("New group name: ");			newProviderGroupNameJPanel.setOpaque(false);			createGroupFromProvidorJToggleButton = true;			JLabel newProvidorGroupPromptJLabel = new JLabel("Select (click on) providers to add to the group: ");			JButton newProvidorGroupNameOkJButton = new JButton(" Ok ");			newProvidorGroupNameOkJButton.addActionListener(this);			newProvidorGroupNameOkJButton.setActionCommand("newProvidorGroupNameOkJButton");			newProvidorGroupNameOkJButton.setBackground(SystemWindow.buttonColor);			newProvidorGroupNameOkJButton.setFont(SystemWindow.systemFont);			newProvidorGroupNameJLabel.setFont(SystemWindow.systemFont);			newProvidorGroupNameJTextField.setText("");			newProvidorGroupNameJTextField.setFont(SystemWindow.systemFont);			newProvidorGroupNameJTextField.addActionListener(this);			newProvidorGroupNameJTextField.setActionCommand("newProvidorGroupNameJTextField");			newProviderGroupNameJPanel.add(newProvidorGroupNameJLabel, newProviderGroupNamePanelConstraints);			newProviderGroupNamePanelConstraints.weighty = 1;			newProviderGroupNamePanelConstraints.weightx = 1;			newProviderGroupNamePanelConstraints.fill = GridBagConstraints.HORIZONTAL;			newProviderGroupNamePanelConstraints.gridx = 1;			newProviderGroupNameJPanel.add(newProvidorGroupNameJTextField, newProviderGroupNamePanelConstraints);			newProviderGroupNamePanelConstraints.gridx = 2;			newProviderGroupNameJPanel.add(newProvidorGroupNameOkJButton, newProviderGroupNamePanelConstraints);			newProviderGroupNamePanelConstraints.gridx = 0;			newProviderGroupNamePanelConstraints.gridwidth = 3;			newProviderGroupNamePanelConstraints.fill = GridBagConstraints.NONE;			newProviderGroupNameJPanel.add(newProvidorGroupPromptJLabel, newProviderGroupNamePanelConstraints);			appointmentProvidorsPopupMenuPanelConstraints.gridy = 0;			appointmentProvidorsPopupMenuPanelConstraints.gridx = 0;			appointmentProvidorsPopupMenuPanelConstraints.gridwidth = 3;			appointmentProvidorsPopupMenuPanelConstraints.insets = new Insets(0, 0, 0, 0);			appointmentProvidorsPopupMenuJPanel.add(newProviderGroupNameJPanel, appointmentProvidorsPopupMenuPanelConstraints);			appointmentProvidorsPopupMenuPanelConstraints.insets = new Insets(6, 6, 0, 6);		} else {			selectProviderIndividualsPromptJLabel.setFont(SystemWindow.systemFont);			selectProviderGroupsPromptJLabel.setFont(SystemWindow.systemFont);			appointmentProvidorsPopupMenuPanelConstraints.gridy = 0;			appointmentProvidorsPopupMenuPanelConstraints.gridx = 0;			appointmentProvidorsPopupMenuPanelConstraints.gridwidth = 3;			appointmentProvidorsPopupMenuPanelConstraints.weighty = 1;			appointmentProvidorsPopupMenuPanelConstraints.fill = GridBagConstraints.HORIZONTAL;			appointmentProvidorsPopupMenuPanelConstraints.insets = new Insets(0, 0, 0, 0);			appointmentProvidorsPopupMenuJPanel.add(selectProvidersHeaderJPanel, appointmentProvidorsPopupMenuPanelConstraints);			appointmentProvidorsPopupMenuPanelConstraints.insets = new Insets(6, 6, 0, 6);			createGroupFromProvidorJToggleButton = false;		}		appointmentProvidorsPopupMenuPanelConstraints.gridy++;		appointmentProvidorsPopupMenuPanelConstraints.gridx = 0;		appointmentProvidorsPopupMenuPanelConstraints.anchor = GridBagConstraints.WEST;		appointmentProvidorsPopupMenuPanelConstraints.fill = GridBagConstraints.HORIZONTAL;		appointmentProvidorsPopupMenuPanelConstraints.gridwidth = 1;		while (providorInd < numProviders) {			providerID = (String) (rootPracticeAppointments.elementAt(providorInd).elementAt(0).elementAt(0).elementAt(0));			facilitiesAssociatedWithProvider = (Vector<String>) (rootPracticeAppointments.elementAt(providorInd).elementAt(0).elementAt(0).elementAt(2));			providerFacility = facilitiesAssociatedWithProvider.elementAt(0);			providorJToggleButton = new JToggleButton();			providorJToggleButton.addActionListener(this);			providorJToggleButton.setActionCommand("providorJToggleButton");			providorJToggleButton.setName(providerID);			providorJToggleButton.setBackground(SystemWindow.buttonColor);			providorJToggleButton.setFont(SystemWindow.systemFont);			providorNameJLabel = new JLabel(getProviderName(providorInd, null));			providorFacilityJLabel = new JLabel(" " + providerFacility + " ");			providorIDJLabel = new JLabel(providerID);			providorJToggleButton.setLayout(new GridBagLayout());			providerButtonConstraints.anchor = providerButtonConstraints.WEST;			providerButtonConstraints.gridx = 0;			providorJToggleButton.add(providorNameJLabel, providerButtonConstraints);			providerButtonConstraints.gridx = 1;			providerButtonConstraints.anchor = providerButtonConstraints.CENTER;			providorJToggleButton.add(providorFacilityJLabel, providerButtonConstraints);			providerButtonConstraints.gridx = 2;			providerButtonConstraints.anchor = providerButtonConstraints.EAST;			providorJToggleButton.add(providorIDJLabel, providerButtonConstraints);			if (providorInd == numProviders - 1) {				appointmentProvidorsPopupMenuPanelConstraints.insets = new Insets(6, 6, 6, 6);			}			appointmentProvidorsPopupMenuPanelConstraints.gridy++;			appointmentProvidorsPopupMenuJPanel.add(providorJToggleButton, appointmentProvidorsPopupMenuPanelConstraints);			providorInd++;		}		appointmentProvidorsPopupMenuPanelConstraints.gridy = 1;		appointmentProvidorsPopupMenuPanelConstraints.gridx = 2;		appointmentProvidorsPopupMenuPanelConstraints.weightx = 1;		int providerGroupInd = 0;		while (providerGroupInd < rootPracticeUserGroups.size()) {			providorGroupJToggleButton = new JToggleButton(rootPracticeUserGroups.elementAt(providerGroupInd).elementAt(0));			if (showProvidorsOrCreateGroup.equals("CREATE_GROUP")) {				providorGroupJToggleButton.addMouseListener(this);			}			providorGroupJToggleButton.setName("providorGroupJToggleButton|" + String.valueOf(providerGroupInd));			providorGroupJToggleButton.setBackground(SystemWindow.buttonColor);			providorGroupJToggleButton.setFont(SystemWindow.systemFont);			appointmentProvidorsPopupMenuPanelConstraints.gridy++;			appointmentProvidorsPopupMenuJPanel.add(providorGroupJToggleButton, appointmentProvidorsPopupMenuPanelConstraints);			providerGroupInd++;		}		appointmentProvidorsPopupMenuPanelConstraints.gridy = 1;		appointmentProvidorsPopupMenuPanelConstraints.gridx = 1;		appointmentProvidorsPopupMenuPanelConstraints.weighty = 1;		appointmentProvidorsPopupMenuPanelConstraints.fill = GridBagConstraints.VERTICAL;		if (providorInd > providerGroupInd) {			appointmentProvidorsPopupMenuPanelConstraints.gridheight = providorInd + 1;		} else {			appointmentProvidorsPopupMenuPanelConstraints.gridheight = providerGroupInd + 1;		}		appointmentProvidorsPopupMenuJPanel.add(verticalLineJPanel, appointmentProvidorsPopupMenuPanelConstraints);		appointmentProvidorsJPopupMenu.show(appointmentsAppointmentProvidorsJPanel, 0, appointmentsAppointmentProvidorsJPanel.getHeight());	}	private String getProviderName(Integer providorInd, String providerID) {		Vector<String> compoundProviderName = null;		String providerWholeName;		String providerNamePrefix;		String providerFirstName;		String providerMiddleName;		String providerLastName;		String providerNameSuffix;		String providerDegree;		String lastDotOrNot;		if (providorInd == null) {			Vector<Vector<String>> rootPracticeUserGroups = (Vector<Vector<String>>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(0));			boolean providerIDIndFound = false;			providorInd = 0;			while (!providerIDIndFound && providorInd < rootPracticeUserGroups.size()) {				if (providerID.equals(rootPracticeUserGroups.elementAt(providorInd).elementAt(0))) {					compoundProviderName = (Vector<String>) (rootPracticeAppointments.elementAt(providorInd).elementAt(0).elementAt(0).elementAt(1));					providerIDIndFound = true;				}				providorInd++;			}		} else {			compoundProviderName = (Vector<String>) (rootPracticeAppointments.elementAt(providorInd).elementAt(0).elementAt(0).elementAt(1));		}		providerNamePrefix = compoundProviderName.elementAt(0);		providerFirstName = compoundProviderName.elementAt(1);		providerMiddleName = compoundProviderName.elementAt(2);		providerLastName = compoundProviderName.elementAt(3);		providerNameSuffix = compoundProviderName.elementAt(4);		providerDegree = compoundProviderName.elementAt(5);		lastDotOrNot = Access.lastDot(providerDegree);		if (!providerMiddleName.equals(null) && !providerMiddleName.equals("")) {			providerMiddleName = " " + providerMiddleName + " ";		} else {			providerFirstName = providerFirstName + " ";		}		if (!providerNameSuffix.equals(null) && !providerNameSuffix.equals("")) {			providerNameSuffix = " " + providerNameSuffix;		}		if (!providerDegree.equals(null) && !providerDegree.equals("")) {			providerDegree = ", " + providerDegree;		}		providerWholeName = providerFirstName + providerMiddleName + providerLastName + providerNameSuffix + providerDegree;		providerWholeName = providerWholeName.replace("  ", " ");		return providerWholeName;	}	private Vector<Vector<Object>> getAppointmentsForSelectedUsersAndCalendarDay(Vector<String> providersToReturnAppointmentsFor, int dayOfYear, int calendarYear) {		Vector<Vector<Object>> appointmentsForSelectedUsers = new Vector<Vector<Object>>();		Vector<Vector<Vector<Vector<Object>>>> practiceAppointmentsInRootStruct = (Vector<Vector<Vector<Vector<Object>>>>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(1));		int providerInd = 0;		int calendarDayInd = 0;		int appointmentInd = 0;		int rootProviderInd;		boolean appointmentsAdded = false;		while (!appointmentsAdded && providerInd < providersToReturnAppointmentsFor.size()) {			rootProviderInd = 0;			while (!appointmentsAdded && rootProviderInd < practiceAppointmentsInRootStruct.size()) {				if (((String) (practiceAppointmentsInRootStruct.elementAt(rootProviderInd).elementAt(0).elementAt(0).elementAt(0))).equals(providersToReturnAppointmentsFor.elementAt(providerInd))) {					calendarDayInd = 1;					while (!appointmentsAdded && calendarDayInd < practiceAppointmentsInRootStruct.elementAt(providerInd).size()) {						Calendar providerCalendarDay = ((Calendar) ((practiceAppointmentsInRootStruct.elementAt(providerInd)).elementAt(calendarDayInd).elementAt(0).elementAt(1)));						int providerCalendarYEAR = providerCalendarDay.get(providerCalendarDay.YEAR);						int providerCalendarDAY_OF_YEAR = providerCalendarDay.get(providerCalendarDay.DAY_OF_YEAR);						if (dayOfYear == providerCalendarDAY_OF_YEAR && calendarYear == providerCalendarYEAR) {							System.out.println("same calendarDay found");							appointmentInd = 0;							while (appointmentInd < practiceAppointmentsInRootStruct.elementAt(providerInd).elementAt(calendarDayInd).size()) {								System.out.println("appointmentsForSelectedUsers.add(...");								appointmentsForSelectedUsers.add(practiceAppointmentsInRootStruct.elementAt(providerInd).elementAt(calendarDayInd).elementAt(appointmentInd));								appointmentInd++;							}							appointmentsAdded = true;						}						calendarDayInd++;					}				}				rootProviderInd++;			}			providerInd++;		}		return appointmentsForSelectedUsers;	}	private void fillBillingJPanel() {		String claimsDirectory;		outputNetworkPanelScrollPaneJPanel.removeAll();		outputNetworkPanelScrollPaneJPanel.setBackground(SystemWindow.lightQuintessentialThemeColor);		outputNetworkPanelScrollPanePanelConstraints = new GridBagConstraints();		JTextField outputDirectoryJTextField;		JPanel billingPanelScrollPanePanelPusherJPanel = new JPanel(new GridBagLayout());		billingPanelScrollPanePanelPusherJPanel.setOpaque(false);		JButton deleteAnOutputDirectoryOkJButton;		JButton viewAnOutputDirectoryOkJButton;		outputNetworkPanelScrollPanePanelConstraints.gridy = 0;		int ind = 0;		int numOutputDirectories = ((Vector) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(10))).size();		while (ind < numOutputDirectories) {			claimsDirectory = ((Vector<String>) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(10))).elementAt(ind);			outputDirectoryJTextField = new JTextField(claimsDirectory);			outputDirectoryJTextField.setFont(SystemWindow.systemFont);			deleteAnOutputDirectoryOkJButton = new JButton(" Delete ");			deleteAnOutputDirectoryOkJButton.setFont(SystemWindow.systemFont);			deleteAnOutputDirectoryOkJButton.setBackground(SystemWindow.buttonColor);			deleteAnOutputDirectoryOkJButton.addActionListener(this);			deleteAnOutputDirectoryOkJButton.setActionCommand("deleteAnOutputDirectoryJButton");			deleteAnOutputDirectoryOkJButton.setName(String.valueOf(ind));			deleteAnOutputDirectoryOkJButton.setBorder(new LineBorder(Color.LIGHT_GRAY, 1));			viewAnOutputDirectoryOkJButton = new JButton(" View ");			viewAnOutputDirectoryOkJButton.setFont(SystemWindow.systemFont);			viewAnOutputDirectoryOkJButton.setBackground(SystemWindow.buttonColor);			viewAnOutputDirectoryOkJButton.addActionListener(this);			viewAnOutputDirectoryOkJButton.setActionCommand("viewAnOutputDirectoryJButton");			viewAnOutputDirectoryOkJButton.setName(String.valueOf(ind));			viewAnOutputDirectoryOkJButton.setBorder(new LineBorder(Color.LIGHT_GRAY, 1));			outputNetworkPanelScrollPanePanelConstraints.gridy = outputNetworkPanelScrollPanePanelConstraints.gridy + 1;			outputNetworkPanelScrollPanePanelConstraints.gridx = 0;			outputNetworkPanelScrollPanePanelConstraints.insets = new Insets(9, 9, 0, 9);			outputNetworkPanelScrollPaneJPanel.add(deleteAnOutputDirectoryOkJButton, outputNetworkPanelScrollPanePanelConstraints);			outputNetworkPanelScrollPanePanelConstraints.gridx = 1;			outputNetworkPanelScrollPanePanelConstraints.weightx = 1;			outputNetworkPanelScrollPanePanelConstraints.fill = GridBagConstraints.HORIZONTAL;			outputNetworkPanelScrollPanePanelConstraints.insets = new Insets(9, 0, 0, 9);			outputNetworkPanelScrollPaneJPanel.add(outputDirectoryJTextField, outputNetworkPanelScrollPanePanelConstraints);			outputNetworkPanelScrollPanePanelConstraints.gridx = 2;			outputNetworkPanelScrollPanePanelConstraints.weightx = 0;			outputNetworkPanelScrollPanePanelConstraints.fill = GridBagConstraints.NONE;			outputNetworkPanelScrollPaneJPanel.add(viewAnOutputDirectoryOkJButton, outputNetworkPanelScrollPanePanelConstraints);			ind++;		}		outputNetworkPanelScrollPanePanelConstraints.gridwidth = 3;		outputNetworkPanelScrollPanePanelConstraints.gridy = outputNetworkPanelScrollPanePanelConstraints.gridy + 1;		outputNetworkPanelScrollPanePanelConstraints.gridx = 0;		outputNetworkPanelScrollPanePanelConstraints.weighty = 1;		outputNetworkPanelScrollPanePanelConstraints.weightx = 1;		outputNetworkPanelScrollPanePanelConstraints.fill = GridBagConstraints.BOTH;		outputNetworkPanelScrollPaneJPanel.add(billingPanelScrollPanePanelPusherJPanel, outputNetworkPanelScrollPanePanelConstraints);	}	public void fillPatientIndexScrollPaneJPanel() {		Dimension patientIndexPaperPanelDimension = new Dimension(900 + margin, (int) (900 * 10.5 / 8) + margin);		Dimension patientIndexContentPanelDimension = new Dimension(900, (int) (900 * 10.5 / 8));		Vector patientIndex = (Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0));		JPanel patientIndexPanel0PusherJPanel;		JPanel patientIndexHeaderJPanel;		patientIndexScrollPaneJPanel.removeAll();		GridBagConstraints patientIndexScrollPanePanelConstraints = new GridBagConstraints();		GridBagConstraints patientIndexPaperPanelConstraints = new GridBagConstraints();		patientIndexScrollPanePanelConstraints.gridy = 0;		int margin = 24;		patientIndexScrollPanePanelConstraints.insets = new Insets(12, 12, 0, 12);		patientIndexPaperPanelConstraints.insets = new Insets(margin, margin, margin, margin);		patientIndexPaperPanelConstraints.weighty = 1;		patientIndexPaperPanelConstraints.weightx = 1;		patientIndexPaperPanelConstraints.fill = GridBagConstraints.BOTH;		JPanel patientIndexContentJPanel;		JPanel patientIndexPaperJPanel;		JLabel patientIndexNumTotalChartsJLabel;		JLabel patientIndexJLabel;		String lastActivity;		int numTotalCharts = patientIndex.size() - 1;		System.out.println("numTotalCharts: " + numTotalCharts);		int nextChartIDInd = 1;		String chartIDInPatientIndex = "";		int pageInd = 1;		int totalPatientIndexPages = (int) (numTotalCharts / 30);		if (totalPatientIndexPages < numTotalCharts / 30) {			totalPatientIndexPages = totalPatientIndexPages + 1;		}		if (totalPatientIndexPages == 0) {			totalPatientIndexPages = 1;		}		JPanel bottomBorderedJPanel;		JLabel pageCountJLabel;		GridBagConstraints patientIndexPanel0Constraints = new GridBagConstraints();		GridBagConstraints patientIndexHeaderPanelConstraints = new GridBagConstraints();		JButton patientIndexChartIDJButton;		JButton patientIndexPatientNameJButton;		JButton patientIndexLastActivityJButton;		JButton chartIDJButton;		JButton patientNameJButton;		JButton lastActivityJButton;		JButton emailJButton;		JButton addressJButton;		JButton phoneJButton;		JButton patientSexAndBirthTimeDateJButton;		int nextChartIDStopInd = 30;		if (nextChartIDStopInd > numTotalCharts) {			nextChartIDStopInd = numTotalCharts;		}		boolean morePanels = true;		while (morePanels) {			pageCountJLabel = new JLabel("page " + pageInd + " of " + totalPatientIndexPages);			pageCountJLabel.setFont(SystemWindow.systemFont);			patientIndexHeaderJPanel = new JPanel(new GridBagLayout());			patientIndexHeaderJPanel.setOpaque(false);			patientIndexHeaderJPanel.setBorder(new MatteBorder(0, 0, 2, 0, new Color(85, 85, 85)));			patientIndexChartIDJButton = new JButton("Chart ID:");			patientIndexChartIDJButton.setContentAreaFilled(false);			patientIndexChartIDJButton.setBorder(null);			patientIndexChartIDJButton.setFont(SystemWindow.systemFont);			patientIndexPatientNameJButton = new JButton("Patient name:");			patientIndexPatientNameJButton.setContentAreaFilled(false);			patientIndexPatientNameJButton.setBorder(null);			patientIndexPatientNameJButton.setFont(SystemWindow.systemFont);			patientIndexLastActivityJButton = new JButton("Last activity:");			patientIndexLastActivityJButton.setContentAreaFilled(false);			patientIndexLastActivityJButton.setBorder(null);			patientIndexLastActivityJButton.setFont(SystemWindow.systemFont);			patientIndexContentJPanel = new JPanel(new GridBagLayout());			patientIndexPaperJPanel = new JPanel(new GridBagLayout());			patientIndexNumTotalChartsJLabel = new JLabel("Number of charts: " + String.valueOf(numTotalCharts));			patientIndexNumTotalChartsJLabel.setOpaque(false);			patientIndexNumTotalChartsJLabel.setFont(SystemWindow.systemFont);			patientIndexJLabel = new JLabel("Patient index: ");			patientIndexJLabel.setFont(SystemWindow.systemFont);			patientIndexJLabel.setOpaque(false);			patientIndexHeaderPanelConstraints.insets = new Insets(0, 0, 0, 20);			patientIndexHeaderJPanel.add(patientIndexJLabel, patientIndexHeaderPanelConstraints);			patientIndexHeaderPanelConstraints.gridx = 1;			patientIndexHeaderJPanel.add(patientIndexNumTotalChartsJLabel, patientIndexHeaderPanelConstraints);			patientIndexHeaderPanelConstraints.gridx = 2;			patientIndexHeaderJPanel.add(pageCountJLabel, patientIndexHeaderPanelConstraints);			patientIndexPanel0Constraints.gridy = 0;			patientIndexPanel0Constraints.gridwidth = 3;			patientIndexPanel0Constraints.weightx = 1;			patientIndexPanel0Constraints.insets = new Insets(31, 22, 0, 22);			patientIndexPanel0Constraints.fill = GridBagConstraints.HORIZONTAL;			patientIndexPanel0Constraints.anchor = GridBagConstraints.WEST;			patientIndexContentJPanel.add(patientIndexHeaderJPanel, patientIndexPanel0Constraints);			patientIndexPanel0Constraints.gridy = 1;			patientIndexPanel0Constraints.gridwidth = 1;			patientIndexPanel0Constraints.insets = new Insets(0, 22, 0, 11);			patientIndexPanel0Constraints.gridx = 1;			patientIndexPanel0Constraints.insets = new Insets(0, 11, 0, 11);			patientIndexPanel0Constraints.gridx = 2;			patientIndexPanel0Constraints.insets = new Insets(0, 11, 0, 22);			patientIndexPanel0Constraints.gridy = 2;			patientIndexContentJPanel.setBackground(Color.WHITE);			patientIndexPaperJPanel.setBackground(Color.WHITE);			pageInd++;			while (nextChartIDInd <= nextChartIDStopInd) {				lastActivity = (String) (((Vector) (((Vector) (patientIndex.elementAt(nextChartIDInd))).elementAt(2))).lastElement());				patientIndexPanel0Constraints.gridx = 0;				chartIDInPatientIndex = (String) (((Vector) (((Vector) (patientIndex.elementAt(nextChartIDInd))).elementAt(0))).elementAt(0));				Vector<Object> patientIndexedInformation = getHumanReadablePatientIndexedInformation(nextChartIDInd);				patientNameJButton = new JButton((String) patientIndexedInformation.elementAt(0));				addressJButton = new JButton((String) patientIndexedInformation.elementAt(1));				phoneJButton = new JButton((String) patientIndexedInformation.elementAt(2));				emailJButton = new JButton((String) patientIndexedInformation.elementAt(3));				patientSexAndBirthTimeDateJButton = new JButton("Sex: " + (String) patientIndexedInformation.elementAt(5) + "  Born: " + (String) patientIndexedInformation.elementAt(4));				chartIDJButton = new JButton(String.valueOf(nextChartIDInd) + ".  " + chartIDInPatientIndex);				lastActivityJButton = new JButton(lastActivity);				bottomBorderedJPanel = new JPanel();				bottomBorderedJPanel.setBorder(new MatteBorder(0, 0, 1, 0, Color.BLACK));				bottomBorderedJPanel.setOpaque(false);				emailJButton.addActionListener(Device.device.workspace.messagingWindow);				emailJButton.setActionCommand("practiceManagementFrame.emailJButton");				emailJButton.setContentAreaFilled(false);				emailJButton.setBorder(null);				emailJButton.setFont(SystemWindow.systemFont);				emailJButton.setName(chartIDInPatientIndex);				phoneJButton.setContentAreaFilled(false);				phoneJButton.setBorder(null);				phoneJButton.setFont(SystemWindow.systemFont);				phoneJButton.setName(chartIDInPatientIndex);				patientSexAndBirthTimeDateJButton.setContentAreaFilled(false);				patientSexAndBirthTimeDateJButton.setBorder(null);				patientSexAndBirthTimeDateJButton.setFont(SystemWindow.systemFont);				patientSexAndBirthTimeDateJButton.setName(chartIDInPatientIndex);				addressJButton.setContentAreaFilled(false);				addressJButton.setBorder(null);				addressJButton.setFont(SystemWindow.systemFont);				chartIDJButton.addActionListener(Device.device.workspace.chartingWindow);				chartIDJButton.setActionCommand("practiceManagementFrame.chartIDJButton");				chartIDJButton.setContentAreaFilled(false);				chartIDJButton.setBorder(null);				chartIDJButton.setFont(SystemWindow.systemFont);				chartIDJButton.setName(chartIDInPatientIndex);				patientNameJButton.addActionListener(Device.device.workspace.chartingWindow);				patientNameJButton.setActionCommand("practiceManagementFrame.chartIDJButton");				patientNameJButton.setContentAreaFilled(false);				patientNameJButton.setBorder(null);				patientNameJButton.setFont(SystemWindow.systemFont);				patientNameJButton.setName(chartIDInPatientIndex);				lastActivityJButton.addActionListener(this);				lastActivityJButton.setActionCommand("lastActivityJButton");				lastActivityJButton.setContentAreaFilled(false);				lastActivityJButton.setBorder(null);				lastActivityJButton.setFont(SystemWindow.systemFont);				lastActivityJButton.setName(chartIDInPatientIndex);				patientIndexPanel0Constraints.weightx = 0;				patientIndexPanel0Constraints.insets = new Insets(0, 0, 0, 0);				patientIndexPanel0Constraints.fill = GridBagConstraints.NONE;				patientIndexPanel0Constraints.gridx = 0;				patientIndexPanel0Constraints.gridwidth = 1;				patientIndexPanel0Constraints.anchor = GridBagConstraints.WEST;				patientIndexPanel0Constraints.insets = new Insets(0, 0, 0, 12);				patientIndexContentJPanel.add(chartIDJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridx = 1;				patientIndexContentJPanel.add(patientNameJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridx = 2;				patientIndexPanel0Constraints.anchor = GridBagConstraints.EAST;				patientIndexContentJPanel.add(phoneJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridx = 3;				patientIndexPanel0Constraints.insets = new Insets(0, 0, 0, 0);				patientIndexContentJPanel.add(emailJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridx = 1;				patientIndexPanel0Constraints.anchor = GridBagConstraints.WEST;				patientIndexPanel0Constraints.gridy = patientIndexPanel0Constraints.gridy + 1;				patientIndexContentJPanel.add(patientSexAndBirthTimeDateJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridx = 2;				patientIndexPanel0Constraints.gridwidth = 2;				patientIndexPanel0Constraints.anchor = GridBagConstraints.EAST;				patientIndexContentJPanel.add(addressJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridy = patientIndexPanel0Constraints.gridy + 1;				patientIndexPanel0Constraints.gridx = 0;				patientIndexPanel0Constraints.gridwidth = 4;				patientIndexContentJPanel.add(lastActivityJButton, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridy = patientIndexPanel0Constraints.gridy + 1;				patientIndexPanel0Constraints.weightx = 1;				patientIndexPanel0Constraints.fill = GridBagConstraints.HORIZONTAL;				patientIndexContentJPanel.add(bottomBorderedJPanel, patientIndexPanel0Constraints);				patientIndexPanel0Constraints.gridy = patientIndexPanel0Constraints.gridy + 1;				nextChartIDInd++;			}			if (nextChartIDStopInd == numTotalCharts) {				morePanels = false;			} else if (nextChartIDStopInd + 30 < numTotalCharts) {				nextChartIDStopInd = nextChartIDStopInd + 30;			} else {				nextChartIDStopInd = numTotalCharts;			}			patientIndexPanel0Constraints.gridx = 0;			patientIndexPanel0Constraints.gridwidth = 3;			patientIndexPanel0Constraints.weighty = 1;			patientIndexPanel0Constraints.fill = GridBagConstraints.VERTICAL;			patientIndexPanel0PusherJPanel = new JPanel(new GridBagLayout());			patientIndexPanel0PusherJPanel.setOpaque(false);			patientIndexContentJPanel.add(patientIndexPanel0PusherJPanel, patientIndexPanel0Constraints);			patientIndexPanel0Constraints.weighty = 0;			patientIndexContentJPanel.setSize(patientIndexContentPanelDimension);			patientIndexContentJPanel.setPreferredSize(patientIndexContentPanelDimension);			patientIndexPaperJPanel.setSize(patientIndexContentPanelDimension);			patientIndexPaperJPanel.setPreferredSize(patientIndexContentPanelDimension);			patientIndexPaperJPanel.setBorder(new CompoundBorder(new MatteBorder(1, 1, 0, 0, new Color(222, 204, 209)), new MatteBorder(0, 0, 2, 2, new Color(165, 155, 152))));			patientIndexPaperJPanel.add(patientIndexContentJPanel, patientIndexPaperPanelConstraints);			patientIndexScrollPaneJPanel.add(patientIndexPaperJPanel, patientIndexScrollPanePanelConstraints);		}	}	public static Vector<Object> getHumanReadablePatientIndexedInformation(int chartID) {		Vector patientIndexInformation = ((Vector) (((Vector) (Vector) (((Vector) (Access.rootAdministrator.elementAt(1))).elementAt(0))).elementAt(chartID)));		Vector concatenatedPatientIndexedInformation = new Vector();		String patientNamePrefix = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(6));		String patientNameGivenName = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(3));		String patientNameMiddleInitialOrName = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(4));		String patientNameLastNamePrefix = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(2));		String patientNameFamilyName = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(1));		String patientNameSuffix = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(5));		String patientNameDegree = (String) (((Vector) (patientIndexInformation.elementAt(1))).elementAt(7));		String patientPhoneNumber = (String) (((Vector) (patientIndexInformation.elementAt(3))).elementAt(0));		String patientEmail = (String) (((Vector) (patientIndexInformation.elementAt(4))).elementAt(0));		String patientSex = (String) (((Vector) (patientIndexInformation.elementAt(6))).elementAt(0));		String patientRace = (String) (((Vector) (patientIndexInformation.elementAt(8))).elementAt(0));		Calendar patientBirthCalendar = Calendar.getInstance();		String timeInMillisString = (String) (((Vector) (patientIndexInformation.elementAt(7))).elementAt(0));		String patientBirthDate = "";		if (null != timeInMillisString) {			patientBirthCalendar.setTimeInMillis(Long.parseLong(timeInMillisString));			patientBirthDate = month[patientBirthCalendar.get(Calendar.MONTH)].substring(0, 3) + " " + patientBirthCalendar.get(Calendar.DAY_OF_MONTH) + ", " + patientBirthCalendar.get(Calendar.YEAR);		}		String patientAddress = "";		int ind = 0;		while (ind < 17) {			if ((String) (((Vector) (patientIndexInformation.elementAt(5))).elementAt(ind)) != null) {				patientAddress = patientAddress + " " + (String) (((Vector) (patientIndexInformation.elementAt(5))).elementAt(ind));			}			ind++;		}		patientAddress = patientAddress.trim();		String patientName = "";		if (patientNamePrefix != null) {			patientName = patientNamePrefix;		}		if (patientNameGivenName != null) {			patientName = patientName + " " + patientNameGivenName;		}		if (patientNameMiddleInitialOrName != null) {			patientName = patientName + " " + patientNameMiddleInitialOrName;		}		if (patientNameLastNamePrefix != null) {			patientName = patientName + " " + patientNameLastNamePrefix;		}		if (patientNameFamilyName != null) {			patientName = patientName + " " + patientNameFamilyName;		}		if (patientNameSuffix != null) {			patientName = patientName + " " + patientNameSuffix;		}		if (patientNameDegree != null) {			patientName = patientName + " " + patientNameDegree;		}		concatenatedPatientIndexedInformation.add(patientName);		concatenatedPatientIndexedInformation.add(patientAddress);		concatenatedPatientIndexedInformation.add(patientPhoneNumber);		concatenatedPatientIndexedInformation.add(patientEmail);		concatenatedPatientIndexedInformation.add(patientBirthDate);		concatenatedPatientIndexedInformation.add(patientSex);		concatenatedPatientIndexedInformation.add(patientRace);		return concatenatedPatientIndexedInformation;	}	private void lowerAppointmentsSplitPaneDivider() {		if (!isAppointmentsSplitPaneDividerLowered) {			appointmentsJSplitPane.setDividerLocation(1.0);			isAppointmentsSplitPaneDividerLowered = true;		} else {			appointmentsJSplitPane.setDividerLocation(appointmentsJSplitPane.getLastDividerLocation());			isAppointmentsSplitPaneDividerLowered = false;		}		validate();		repaint();	}	private boolean syncAppointmentCalendarWithTalkback(JTextField appointmentField) {		String appointmentFieldText = appointmentField.getText();		boolean valideChange = false;		System.out.println("appointmentField: " + appointmentField);		System.out.println("appointmentFieldText: " + appointmentFieldText);		if (appointmentField.getName().equals("appointmentCalendarDayOfWeekJTextField")) {			int dayOfWeekOrdinal = 0;			while (!valideChange && dayOfWeekOrdinal < 7) {				if (dayOfWeek[dayOfWeekOrdinal].toUpperCase().startsWith(appointmentFieldText.toUpperCase())) {					appointmentsFormCalendar.roll(appointmentsFormCalendar.DAY_OF_WEEK, dayOfWeekOrdinal - appointmentsFormCalendar.get(appointmentsFormCalendar.DAY_OF_WEEK));					appointmentCalendarDayOfWeekJTextField.setBackground(Color.WHITE);					valideChange = true;				}				dayOfWeekOrdinal++;			}			if (!valideChange) {				appointmentCalendarDayOfWeekJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valid month.", null, true);			}		} else if (appointmentField.getName().equals("appointmentCalendarMonthJTextField")) {			int monthOrdinal = 0;			while (!valideChange && monthOrdinal < 12) {				if (month[monthOrdinal].toUpperCase().startsWith(appointmentFieldText.toUpperCase())) {					appointmentsFormCalendar.roll(appointmentsFormCalendar.MONTH, monthOrdinal - appointmentsFormCalendar.get(appointmentsFormCalendar.MONTH));					appointmentCalendarMonthJTextField.setBackground(Color.WHITE);					valideChange = true;				}				monthOrdinal++;			}			if (!valideChange) {				appointmentCalendarMonthJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valid month.", null, true);			}		} else if (appointmentField.getName().equals("appointmentCalendarDayOfMonthJTextField")) {			try {				if (0 < Integer.parseInt(appointmentFieldText) && Integer.parseInt(appointmentFieldText) < appointmentsFormCalendar.getActualMaximum(appointmentsFormCalendar.DAY_OF_MONTH) + 1) {					appointmentsFormCalendar.roll(appointmentsFormCalendar.DAY_OF_YEAR, Integer.parseInt(appointmentFieldText) - appointmentsFormCalendar.get(appointmentsFormCalendar.DAY_OF_MONTH));					appointmentCalendarDayOfMonthJTextField.setBackground(Color.WHITE);					valideChange = true;				} else if (Integer.parseInt(appointmentFieldText) > appointmentsFormCalendar.getActualMaximum(appointmentsFormCalendar.DAY_OF_MONTH)) {					appointmentCalendarDayOfMonthJTextField.setBackground(invalidePinkFieldColor);					addTalkbackText("The day of month is to large for " + month[appointmentsFormCalendar.get(appointmentsFormCalendar.MONTH)], null, true);				}			} catch (Exception ert) {				System.out.println("ert: " + ert);				ert.printStackTrace();				appointmentCalendarDayOfMonthJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valid day of the month", null, true);			}		} else if (appointmentField.getName().equals("appointmentCalendarYearJTextField")) {			try {				if (Calendar.getInstance().get(Calendar.YEAR) < Integer.parseInt(appointmentFieldText) && Integer.parseInt(appointmentFieldText) < 2063) {					appointmentsFormCalendar.add(appointmentsFormCalendar.YEAR, Integer.parseInt(appointmentFieldText) - appointmentsFormCalendar.get(appointmentsFormCalendar.YEAR));					appointmentCalendarYearJTextField.setBackground(Color.WHITE);					valideChange = true;				} else {					appointmentCalendarDayOfMonthJTextField.setBackground(invalidePinkFieldColor);					addTalkbackText("Please enter a valid year between " + Calendar.getInstance().get(Calendar.YEAR) + " and " + (Calendar.getInstance().get(Calendar.YEAR) + 99), null, true);				}			} catch (Exception ert) {				appointmentCalendarYearJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valid year", null, true);			}		} else if (appointmentField.getName().equals("appointmentCalendarHourJTextField")) {			try {				if (appointmentCalendarAmPmJTextField.getText().equals("AM") || appointmentCalendarAmPmJTextField.getText().equals("PM")) {					if (-1 < Integer.parseInt(appointmentFieldText) && Integer.parseInt(appointmentFieldText) < 13) {						if (Integer.parseInt(appointmentFieldText) == 12) {							appointmentsFormCalendar.set(appointmentsFormCalendar.HOUR, 0);						} else {							appointmentsFormCalendar.set(appointmentsFormCalendar.HOUR, Integer.parseInt(appointmentFieldText));						}						appointmentCalendarHourJTextField.setBackground(Color.WHITE);						valideChange = true;					} else {						appointmentCalendarHourJTextField.setBackground(invalidePinkFieldColor);						addTalkbackText("Please enter a valid from 0 to 12", null, true);					}				} else if (-1 < Integer.parseInt(appointmentFieldText) && Integer.parseInt(appointmentFieldText) < 25) {					appointmentsFormCalendar.set(appointmentsFormCalendar.HOUR_OF_DAY, Integer.parseInt(appointmentFieldText));					appointmentCalendarHourJTextField.setBackground(Color.WHITE);					valideChange = true;				} else {					appointmentCalendarHourJTextField.setBackground(invalidePinkFieldColor);					addTalkbackText("Please enter a valid 24-hour time in the hour field", null, true);				}			} catch (Exception ert) {				appointmentCalendarHourJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valid hour", null, true);			}		} else if (appointmentField.getName().equals("appointmentCalendarMinuteJTextField")) {			try {				if (-1 < Integer.parseInt(appointmentFieldText) && Integer.parseInt(appointmentFieldText) < 60) {					appointmentsFormCalendar.set(appointmentsFormCalendar.MINUTE, Integer.parseInt(appointmentFieldText));					appointmentCalendarMinuteJTextField.setBackground(Color.WHITE);					valideChange = true;				} else {					appointmentCalendarMinuteJTextField.setBackground(invalidePinkFieldColor);					addTalkbackText("Please enter a valid minute (0 to 59)", null, true);				}			} catch (Exception ert) {				appointmentCalendarMinuteJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valid minute (0 to 59)", null, true);			}		} else if (appointmentField.getName().equals("appointmentCalendarAmPmJTextField")) {			if (appointmentFieldText.equals("AM")) {				appointmentsFormCalendar.set(appointmentsFormCalendar.AM_PM, 0);				valideChange = true;			} else if (appointmentFieldText.equals("PM")) {				appointmentsFormCalendar.set(appointmentsFormCalendar.AM_PM, 1);				valideChange = true;			}		}		if (valideChange) {			rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);		}		return valideChange;	}	@Override	public void actionPerformed(ActionEvent e) {		if (e.getActionCommand().startsWith("reportsJButton")) {			mainCardLayout.show(mainCardedJPanel, "billingJPanel");		} else if (e.getActionCommand().startsWith("appointmentCalendar")) {			syncAppointmentCalendarWithTalkback(((JTextField) e.getSource()));		} else if (e.getActionCommand().equals("providorJToggleButton")) {			if (createGroupFromProvidorJToggleButton) {				newProvidorIDGroup.add(((JToggleButton) (e.getSource())).getName());			} else {				System.out.println("appointmentsAppointmentProvidorsJTextField.getText(): " + appointmentsAppointmentProvidorsJTextField.getText());				if (appointmentsAppointmentProvidorsJTextField.getText().equals("")) {					appointmentsAppointmentProvidorsJTextField.setText(((JToggleButton) (e.getSource())).getName());				} else {					JLabel providorNameJLabel = new JLabel(getProviderName(null, ((JToggleButton) (e.getSource())).getName()));					providorNameJLabel.setFont(SystemWindow.systemFont);					providorNameJLabel.setForeground(SystemWindow.outputColor);					providorNameJLabel.addMouseListener(this);					providorNameJLabel.setName("providorNameJLabel");					appointmentsAppointmentProvidorsPanelConstraints.anchor = GridBagConstraints.WEST;					appointmentsAppointmentProvidorsPanelConstraints.gridy++;					appointmentsAppointmentProvidorsJPanel.add(providorNameJLabel, appointmentsAppointmentProvidorsPanelConstraints);				}				appointmentProvidorsJPopupMenu.setVisible(false);				selectedAppointmentProviders.add(((JToggleButton) (e.getSource())).getName());			}		} else if (e.getActionCommand().equals("newProvidorGroupNameOkJButton") || e.getActionCommand().equals("newProvidorGroupNameJTextField")) {			String newProviderGroupName = newProvidorGroupNameJTextField.getText();			Vector<Vector<String>> rootPracticeUserGroups = (Vector<Vector<String>>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(0));			boolean existsNewProviderGroupName = false;			int ind = 0;			while (!existsNewProviderGroupName && ind < rootPracticeUserGroups.size()) {				if (newProviderGroupName.equals(rootPracticeUserGroups.elementAt(ind).elementAt(0))) {					existsNewProviderGroupName = true;					addTalkbackText("Provider group, \"" + newProviderGroupName + ",\" already exists.", null, true);				}				ind++;			}			if (!existsNewProviderGroupName) {				rootPracticeUserGroups.add(new Vector<String>());				rootPracticeUserGroups.lastElement().add(newProviderGroupName);				int newProviderIdInd = 0;				while (newProviderIdInd < newProvidorIDGroup.size()) {					rootPracticeUserGroups.lastElement().add(newProvidorIDGroup.elementAt(newProviderIdInd));					newProviderIdInd++;				}				addTalkbackText("Provider group, \"" + newProviderGroupName + ",\" added.", null, true);			}			appointmentProvidorsJPopupMenu.setVisible(false);			appointmentProvidorsJPopupMenu.show(appointmentsAppointmentProvidorsJPanel, 0, appointmentsAppointmentProvidorsJPanel.getHeight());		} else if (e.getActionCommand().equals("createAGroupJButton")) {		} else if (e.getActionCommand().equals("deleteAnOutputDirectoryJButton")) {			int claimsDirectoryInd = Integer.parseInt(((JButton) (e.getSource())).getName());			((Vector<String>) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(10))).remove(claimsDirectoryInd);			fillBillingJPanel();			validate();			repaint();		} else if (e.getActionCommand().equals("addAnOutputDirectoryJButton")) {			((Vector<String>) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(10))).add(addAnOutputDirectoryJTextField.getText());			fillBillingJPanel();			validate();			repaint();		} else if (e.getActionCommand().equals("viewAnOutputDirectoryJButton")) {			int claimsDirectoryInd = Integer.parseInt(((JButton) (e.getSource())).getName());			fillOutputDirectoriesJPanel(claimsDirectoryInd);		} else if (e.getActionCommand().equals("USERSELECTED")) {			SystemWindow.println("User selected.");		} else if (e.getActionCommand().equals("appointmentsEmailReminderJButton")) {		} else if (e.getActionCommand().equals("appointmentsPhoneReminderJButton")) {		} else if (e.getActionCommand().equals("appointmentsPrintJButton")) {			Vector<JPanel> printPageJPanels = new Vector(1, 1);			JPanel pageContainerJPanel = null;			String pageFormat = null;			if (appointmentsDayJPanel.isShowing()) {				pageFormat = "REPORT";				pageContainerJPanel = (JPanel) (appointmentsContentPanelScrollPaneCardedJPanel.getComponent(0));			} else if (appointmentsWeekJPanel.isShowing()) {				pageFormat = "REPORT";				pageContainerJPanel = (JPanel) (appointmentsContentPanelScrollPaneCardedJPanel.getComponent(1));			} else if (appointmentsMonthJPanel.isShowing()) {				pageFormat = "PORTRAIT";				pageContainerJPanel = (JPanel) (appointmentsContentPanelScrollPaneCardedJPanel.getComponent(2));			}			int ind = 0;			while (ind < pageContainerJPanel.getComponentCount()) {				printPageJPanels.add((JPanel) (appointmentsContentPanelScrollPaneCardedJPanel.getComponent(ind)));				ind++;			}			Device.device.io.printNow("userName", pageFormat, printPageJPanels);		} else if (e.getActionCommand().equals("appointmentsSaveJButton")) {			if (selectedAppointmentProviders.isEmpty()) {				selectedAppointmentProviders.add(Access.loggedOnUserID);			}			saveA(selectedAppointmentProviders);			selectedAppointmentProviders.removeAllElements();		} else if (e.getActionCommand().equals("appointmentsDayOfMonthViewingOptionJToggleButton")) {			appointmentsWeekViewingOptionJToggleButton.setSelected(false);			appointmentsMonthViewingOptionJToggleButton.setSelected(false);			reportsContentPanelScrollPanePanelConstraints.insets = new Insets(18, 0, 12, 0);			System.out.println("appointments(DAY) called from appointmentsDayOfMonthViewingOptionJToggleButton action");			appointmentsDayJPanel.removeAll();			appointmentsDayPanelConstraints.weighty = 1;			appointmentsDayPanelConstraints.weightx = 1;			appointmentsDayPanelConstraints.fill = GridBagConstraints.BOTH;			if (selectedAppointmentProviders.isEmpty()) {				selectedAppointmentProviders.add(Access.loggedOnUserID);			}			appointmentsDayJPanel.add(appointments("DAY", selectedAppointmentProviders, dayCalendar.get(dayCalendar.DAY_OF_YEAR), dayCalendar.get(dayCalendar.YEAR)), appointmentsDayPanelConstraints);			appointmentsContentPanelScrollPanePanelCardLayout.show(appointmentsContentPanelScrollPaneCardedJPanel, "appointmentsDayPanelBaseJPanel");			validate();			repaint();		} else if (e.getActionCommand().equals("appointmentsWeekViewingOptionJToggleButton")) {			appointmentsWeekViewingOptionJToggleButton.setSelected(false);			appointmentsMonthViewingOptionJToggleButton.setSelected(false);			reportsContentPanelScrollPanePanelConstraints.insets = new Insets(18, 0, 12, 0);			appointmentsWeekJPanel.removeAll();			System.out.println("appointments(WEEK) called from appointmentsWeekViewingOptionJToggleButton action");			appointmentsWeekPanelConstraints.weighty = 1;			appointmentsWeekPanelConstraints.weightx = 1;			appointmentsWeekPanelConstraints.fill = GridBagConstraints.BOTH;			appointmentsWeekJPanel.add(appointments("WEEK", selectedAppointmentProviders, dayCalendar.get(dayCalendar.DAY_OF_YEAR), dayCalendar.get(dayCalendar.YEAR)), appointmentsWeekPanelConstraints);			appointmentsContentPanelScrollPanePanelCardLayout.show(appointmentsContentPanelScrollPaneCardedJPanel, "appointmentsWeekJPanel");			validate();			repaint();		} else if (e.getActionCommand().equals("appointmentsMonthViewingOptionJToggleButton")) {			appointmentsDayOfMonthViewingOptionJToggleButton.setSelected(false);			appointmentsWeekViewingOptionJToggleButton.setSelected(false);			appointmentsMonthViewingOptionJToggleButton.setSelected(true);			reportsContentPanelScrollPanePanelConstraints.insets = new Insets(18, 0, 12, 0);			appointmentsMonthJPanel.removeAll();			System.out.println("appointments(MONTH) called from appointmentsMonthViewingOptionJToggleButton action");			appointmentsMonthPanelConstraints.gridy = 0;			appointmentsMonthJPanel.add(monthCalendarMonthHeaderJLabel, appointmentsMonthPanelConstraints);			monthCalendarMonthHeaderJLabel.setFont(new Font("arial", Font.PLAIN, 22));			appointmentsMonthPanelConstraints.gridy = 1;			while (monthCalendar.get(monthCalendar.DAY_OF_MONTH) != 1)				monthCalendar.add(monthCalendar.HOUR, -24);			if (selectedAppointmentProviders.isEmpty()) {				selectedAppointmentProviders.add(Access.loggedOnUserID);			}			appointmentsMonthJPanel.add(appointments("MONTH", selectedAppointmentProviders, monthCalendar.get(monthCalendar.DAY_OF_YEAR), monthCalendar.get(monthCalendar.YEAR)), appointmentsMonthPanelConstraints);			appointmentsContentPanelScrollPanePanelCardLayout.show(appointmentsContentPanelScrollPaneCardedJPanel, "appointmentsMonthJPanel");			validate();			repaint();		} else if (e.getActionCommand().equals("appointmentsNextViewJButton")) {			if (appointmentsDayJPanel.isShowing()) {				dayCalendar.roll(dayCalendar.MONTH, 1);				appointmentsDayJPanel.removeAll();				appointmentsDayPanelConstraints.gridy = 1;				appointmentsDayPanelConstraints.gridx = 1;				appointmentsDayPanelConstraints.fill = GridBagConstraints.BOTH;				appointmentsDayJPanel.add(appointments("DAY", selectedAppointmentProviders, dayCalendar.get(dayCalendar.DAY_OF_YEAR), dayCalendar.get(dayCalendar.YEAR)), appointmentsDayPanelConstraints);				repaint();			} else if (appointmentsWeekJPanel.isShowing()) {				weekCalendar.roll(weekCalendar.MONTH, 1);			} else if (appointmentsMonthJPanel.isShowing()) {				monthCalendar.add(monthCalendar.HOUR, 24 * monthCalendar.getActualMaximum(monthCalendar.DAY_OF_MONTH));				while (monthCalendar.get(monthCalendar.DAY_OF_MONTH) != 1)					monthCalendar.add(monthCalendar.HOUR, -24);				appointmentsMonthJPanel.removeAll();				appointmentsMonthPanelConstraints.gridy = 1;				appointmentsMonthPanelConstraints.gridx = 1;				appointmentsMonthPanelConstraints.fill = GridBagConstraints.BOTH;				appointmentsMonthJPanel.add(appointments("MONTH", selectedAppointmentProviders, monthCalendar.get(monthCalendar.DAY_OF_YEAR), monthCalendar.get(monthCalendar.YEAR)), appointmentsMonthPanelConstraints);				validate();				repaint();			}		} else if (e.getActionCommand().equals("appointmentsBackViewJButton")) {			if (appointmentsDayJPanel.isShowing()) {				dayCalendar.roll(dayCalendar.MONTH, -1);				appointmentsDayJPanel.removeAll();				appointmentsDayPanelConstraints.gridy = 1;				appointmentsDayPanelConstraints.gridx = 1;				appointmentsDayPanelConstraints.fill = GridBagConstraints.BOTH;				appointmentsDayJPanel.add(appointments("DAY", selectedAppointmentProviders, monthCalendar.get(monthCalendar.DAY_OF_YEAR), monthCalendar.get(monthCalendar.YEAR)), appointmentsDayPanelConstraints);				repaint();			} else if (appointmentsWeekJPanel.isShowing()) {				weekCalendar.roll(weekCalendar.MONTH, -1);			} else if (appointmentsMonthJPanel.isShowing()) {				monthCalendar.add(monthCalendar.HOUR, -24 * monthCalendar.getActualMaximum(monthCalendar.DAY_OF_MONTH));				appointmentsMonthJPanel.removeAll();				appointmentsMonthPanelConstraints.gridy = 1;				appointmentsMonthPanelConstraints.gridx = 1;				appointmentsMonthPanelConstraints.fill = GridBagConstraints.BOTH;				appointmentsMonthJPanel.add(appointments("MONTH", selectedAppointmentProviders, monthCalendar.get(monthCalendar.DAY_OF_YEAR), monthCalendar.get(monthCalendar.YEAR)), appointmentsMonthPanelConstraints);				validate();				repaint();			}		} else if (e.getActionCommand().equals("patientIndexJButton")) {			fillPatientIndexScrollPaneJPanel();			patientIndexJButton.setBackground(Color.LIGHT_GRAY);			billingJButton.setBackground(SystemWindow.buttonColor);			appointmentsJButton.setBackground(SystemWindow.buttonColor);			viewMedicalCodesJButton.setBackground(SystemWindow.buttonColor);			mainCardedJPanel.validate();			mainCardLayout.show(mainCardedJPanel, "patientIndexJPanel");			addTalkbackText("Practice Assistant - Patient index:", null, true);			validate();			repaint();		} else if (e.getActionCommand().equals("billingJButton")) {			patientIndexJButton.setBackground(SystemWindow.buttonColor);			billingJButton.setBackground(Color.LIGHT_GRAY);			appointmentsJButton.setBackground(SystemWindow.buttonColor);			viewMedicalCodesJButton.setBackground(SystemWindow.buttonColor);			fillBillingJPanel();			mainCardLayout.show(mainCardedJPanel, "billingJPanel");			addTalkbackText("Practice Assistant - Billing:", null, true);		} else if (e.getActionCommand().equals("appointmentsJButton")) {			appointmentsFormCalendar = Calendar.getInstance();			selectedAppointmentProviders.removeAllElements();			System.out.println("Access.processedLoginAnswer: " + Access.processedLoginAnswer);			setAppointmentObjectsEnabled(true);			appointmentsDayJPanel.removeAll();			appointmentsDayPanelConstraints.gridy = 1;			appointmentsDayPanelConstraints.gridx = 1;			appointmentsDayPanelConstraints.fill = GridBagConstraints.BOTH;			dayCalendar = Calendar.getInstance();			selectedAppointmentProviders.add(Access.loggedOnUserID);			appointmentsDayJPanel.add(appointments("DAY", selectedAppointmentProviders, dayCalendar.get(dayCalendar.DAY_OF_YEAR), dayCalendar.get(dayCalendar.YEAR)), appointmentsDayPanelConstraints);			selectedAppointmentProviders.removeAllElements();			addTalkbackText("Practice Assistant - Appointments", null, true);			patientIndexJButton.setBackground(SystemWindow.buttonColor);			billingJButton.setBackground(SystemWindow.buttonColor);			appointmentsJButton.setBackground(Color.LIGHT_GRAY);			viewMedicalCodesJButton.setBackground(SystemWindow.buttonColor);			mainCardLayout.show(mainCardedJPanel, "appointmentsSplitPaneBaseJPanel");			repaint();		} else if (e.getActionCommand().equals("viewMedicalCodesJButton")) {			patientIndexJButton.setBackground(SystemWindow.buttonColor);			billingJButton.setBackground(SystemWindow.buttonColor);			appointmentsJButton.setBackground(SystemWindow.buttonColor);			viewMedicalCodesJButton.setBackground(Color.LIGHT_GRAY);			mainCardLayout.show(mainCardedJPanel, "viewMedicalCodesJPanel");			addTalkbackText("Practice Assistant - View codes", null, true);		} else if (e.getActionCommand().equals("rXNormCodeSetJButton")) {			Vector<Vector<String>> queries = parseCodeSetQuery(queryToFindInCodeSetJTextField.getText());			if (!queries.equals(null)) {				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "blankCodeSetCoverJPanel");				rXNormCodeSetJButton.setBackground(SystemWindow.buttonColor);				hL7CodeSetJButton.setBackground(SystemWindow.buttonColor);				cPTCodeSetJButton.setBackground(SystemWindow.buttonColor);				iCDCodeSetJButton.setBackground(SystemWindow.buttonColor);				if (queries.elementAt(0).elementAt(0).equals("")) {					rXNormCodeSetJButton.setBackground(SystemWindow.buttonColor);					addTalkbackText("RxNorm is too large to display everything; please enter a search term", null, true);				} else {					rXNormCodeSetJButton.setBackground(Color.LIGHT_GRAY);					setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));					rXNormCodeSetJPanel.removeAll();					SystemWindow.println("rXNormCodeSetJButton");					rXNormCodeSetJPanel.add(codeSetPanel("practiceFrame", "RXNCONSO09072010", queries, 0), codeSetPanelConstraints);					viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "rXNormCodeSetJPanel");					repaint();					setCursor(Cursor.getDefaultCursor());				}			} else {				addTalkbackText("Please enter a valid search query", null, true);			}		} else if (e.getActionCommand().equals("hL7CodeSetJButton")) {			Vector<Vector<String>> queries = parseCodeSetQuery(queryToFindInCodeSetJTextField.getText());			if (!queries.equals(null)) {				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "blankCodeSetCoverJPanel");				hL7CodeSetJButton.setBackground(Color.LIGHT_GRAY);				rXNormCodeSetJButton.setBackground(SystemWindow.buttonColor);				cPTCodeSetJButton.setBackground(SystemWindow.buttonColor);				iCDCodeSetJButton.setBackground(SystemWindow.buttonColor);				lOINCCodeSetJButton.setBackground(SystemWindow.buttonColor);				setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));				hL7CodeSetJPanel.removeAll();				hL7CodeSetJPanel.add(codeSetPanel("practiceFrame", "HL7_2.3.1", queries, 0), codeSetPanelConstraints);				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "hL7CodeSetJPanel");				repaint();				setCursor(Cursor.getDefaultCursor());			} else {				addTalkbackText("Please enter a valid search query", null, true);			}		} else if (e.getActionCommand().equals("lOINCCodeSetJButton")) {			Vector<Vector<String>> queries = parseCodeSetQuery(queryToFindInCodeSetJTextField.getText());			if (!queries.equals(null)) {				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "blankCodeSetCoverJPanel");				rXNormCodeSetJButton.setBackground(SystemWindow.buttonColor);				hL7CodeSetJButton.setBackground(SystemWindow.buttonColor);				cPTCodeSetJButton.setBackground(SystemWindow.buttonColor);				iCDCodeSetJButton.setBackground(SystemWindow.buttonColor);				if (queries.elementAt(0).elementAt(0).equals("")) {					lOINCCodeSetJButton.setBackground(SystemWindow.buttonColor);					addTalkbackText("LOINC is too large to display everything; please enter a search term", null, true);				} else {					lOINCCodeSetJButton.setBackground(Color.LIGHT_GRAY);					setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));					lOINCCodeSetJPanel.removeAll();					lOINCCodeSetJPanel.add(codeSetPanel("practiceFrame", "LOINC2.32", queries, 0), codeSetPanelConstraints);					viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "lOINCCodeSetJPanel");					repaint();					setCursor(Cursor.getDefaultCursor());				}			} else {				addTalkbackText("Please enter a valid search query", null, true);			}		} else if (e.getActionCommand().equals("cPTCodeSetJButton")) {			Vector<Vector<String>> queries = parseCodeSetQuery(queryToFindInCodeSetJTextField.getText());			if (!queries.equals(null)) {				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "blankCodeSetCoverJPanel");				rXNormCodeSetJButton.setBackground(SystemWindow.buttonColor);				hL7CodeSetJButton.setBackground(SystemWindow.buttonColor);				cPTCodeSetJButton.setBackground(Color.LIGHT_GRAY);				iCDCodeSetJButton.setBackground(SystemWindow.buttonColor);				lOINCCodeSetJButton.setBackground(SystemWindow.buttonColor);				setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));				cPTCodeSetJPanel.removeAll();				cPTCodeSetJPanel.add(codeSetPanel("practiceFrame", "CPT2009", queries, 0), codeSetPanelConstraints);				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "cPTCodeSetJPanel");				repaint();				setCursor(Cursor.getDefaultCursor());			} else {				addTalkbackText("Please enter a valid search query", null, true);			}		} else if (e.getActionCommand().equals("iCDCodeSetJButton")) {			Vector<Vector<String>> queries = parseCodeSetQuery(queryToFindInCodeSetJTextField.getText());			if (!queries.equals(null)) {				viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "blankCodeSetCoverJPanel");				rXNormCodeSetJButton.setBackground(SystemWindow.buttonColor);				hL7CodeSetJButton.setBackground(SystemWindow.buttonColor);				cPTCodeSetJButton.setBackground(SystemWindow.buttonColor);				lOINCCodeSetJButton.setBackground(SystemWindow.buttonColor);				if (queries.elementAt(0).elementAt(0).equals("")) {					iCDCodeSetJButton.setBackground(SystemWindow.buttonColor);					addTalkbackText("ICD10 is too large to display everything; please enter a search term", null, true);				} else {					iCDCodeSetJButton.setBackground(Color.LIGHT_GRAY);					setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));					iCDCodeSetJPanel.removeAll();					iCDCodeSetJPanel.add(codeSetPanel("practiceFrame", "ICD10", queries, 0), codeSetPanelConstraints);					viewMedicalCodesCardLayout.show(viewMedicalCodesCardedJPanel, "iCDCodeSetJPanel");					repaint();					setCursor(Cursor.getDefaultCursor());				}			} else {				addTalkbackText("Please enter a valid search query", null, true);			}		}	}	public void saveA(Vector<String> selectedProviders) {		int selectedProviderInd = 0;		int numProviders = ((Vector<Integer>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(1))).size();		int appointmentInd;		int numAppointments;		int appointmentDayInd;		int numSelectedProviderAppointmentDays;		Vector<Object> appointment = validateAndReturnAppointment();		if (appointment != null) {			int numProviderAppointmentCalendarDays = 0;			int numRootAppointmentsInDay;			String foundProvidorID = null;			int numProviderAppointments;			int numRootProviders;			int rootProviderInd;			Vector<Vector<Vector<Object>>> selectedProviderRootAppointments = null;			rootPracticeAppointments = (Vector<Vector<Vector<Vector<Object>>>>) (((Vector) (Access.rootAdministrator.elementAt(5))).elementAt(1));			boolean providerStructFound = false;			while (selectedProviderInd < selectedProviders.size()) {				numRootProviders = rootPracticeAppointments.size();				rootProviderInd = 0;				while (rootProviderInd < numRootProviders) {					String rootProviderID = (String) (rootPracticeAppointments.elementAt(rootProviderInd).elementAt(0).elementAt(0).elementAt(0));					if (rootProviderID.equals(selectedProviders.elementAt(selectedProviderInd))) {						System.out.println("Found provider struct");						selectedProviderRootAppointments = rootPracticeAppointments.elementAt(rootProviderInd);						boolean calendarDayFound = false;						numSelectedProviderAppointmentDays = selectedProviderRootAppointments.size();						System.out.println("numSelectedProviderAppointmentDays should be 1 before adding due to providerID key: " + numSelectedProviderAppointmentDays);						appointmentDayInd = 1;						while (appointmentDayInd < numSelectedProviderAppointmentDays) {							System.out.println("while (calendarDayInd < calendarDaysInProviderAppointments) {");							Calendar rootAppointmentCalendar = ((Calendar) (selectedProviderRootAppointments.elementAt(appointmentDayInd).elementAt(0).elementAt(1)));							int rootAppointmentCalendarYEAR = rootAppointmentCalendar.get(rootAppointmentCalendar.YEAR);							int rootAppointmentCalendarDAY_OF_YEAR = rootAppointmentCalendar.get(rootAppointmentCalendar.DAY_OF_YEAR);							int formCalendarYEAR = ((Calendar) (appointment.elementAt(1))).get(appointmentsFormCalendar.YEAR);							int formCalendarDAY_OF_YEAR = ((Calendar) (appointment.elementAt(1))).get(appointmentsFormCalendar.DAY_OF_YEAR);							if (rootAppointmentCalendarYEAR == formCalendarYEAR && rootAppointmentCalendarDAY_OF_YEAR == formCalendarDAY_OF_YEAR) {								System.out.println("calendar day found for provider");								calendarDayFound = true;								appointmentInd = 0;								numAppointments = selectedProviderRootAppointments.elementAt(appointmentDayInd).size();								Calendar providerCalendarAppointment = ((Calendar) (selectedProviderRootAppointments.elementAt(appointmentDayInd).elementAt(appointmentInd).elementAt(1)));								if (numAppointments == 1) {									System.out.println("numAppointments == 1");									if (((Calendar) (appointment.elementAt(1))).before(providerCalendarAppointment)) {										System.out.println("    appointment is before providerCalendarAppointment");										System.out.println("    SAVING 00");										selectedProviderRootAppointments.elementAt(appointmentDayInd).setElementAt(appointment, 0);									} else {										System.out.println("    appointment is after providerCalendarAppointment");										System.out.println("    SAVING 0");										selectedProviderRootAppointments.elementAt(appointmentDayInd).add(appointment);									}								} else {									boolean added = false;									while (!added && appointmentInd < numAppointments - 1) {										System.out.println("numAppointments != 1; appointmentInd: " + appointmentInd);										if (((Calendar) (appointment.elementAt(1))).getTimeInMillis() == providerCalendarAppointment.getTimeInMillis()) {											System.out.println("    appointment times are the same" + appointmentInd);											System.out.println("    SAVING 1");											selectedProviderRootAppointments.elementAt(appointmentDayInd).setElementAt(appointment, appointmentInd);											added = true;										} else {											Calendar nextProviderCalendarAppointment = ((Calendar) (selectedProviderRootAppointments.elementAt(appointmentDayInd).elementAt(appointmentInd + 1).elementAt(1)));											if (((Calendar) (appointment.elementAt(1))).after(providerCalendarAppointment) && ((Calendar) (appointment.elementAt(1))).before(nextProviderCalendarAppointment)) {												System.out.println("    appointment found between times ");												System.out.println("    SAVING 2");												selectedProviderRootAppointments.elementAt(appointmentDayInd).setElementAt(appointment, appointmentInd + 1);												added = true;											}										}										appointmentInd++;									}									if (!added) {										System.out.println("    appointment is the latest on the calendar day");										selectedProviderRootAppointments.elementAt(appointmentDayInd).add(appointment);									}								}							}							appointmentDayInd++;						}						if (!calendarDayFound) {							System.out.println("Placing appointment in a new calendar day struct and saving appointment");							selectedProviderRootAppointments.add(new Vector<Vector<Object>>());							selectedProviderRootAppointments.lastElement().add(appointment);						}					} else {						System.out.println("Critical error: no provider found");					}					rootProviderInd++;				}				selectedProviderInd++;			}			System.out.println("calendarDay and year saved:" + ((Calendar) (appointment.elementAt(1))).get(((Calendar) (appointment.elementAt(1))).DAY_OF_YEAR) + ", " + ((Calendar) (appointment.elementAt(1))).get(((Calendar) (appointment.elementAt(1))).YEAR));			appointmentsContentPanelScrollPanePanelCardLayout.show(appointmentsContentPanelScrollPaneCardedJPanel, "appointmentsDayPanelBaseJPanel");			appointmentsDayJPanel.removeAll();			appointmentsDayPanelConstraints.gridy = 1;			appointmentsDayPanelConstraints.gridx = 1;			appointmentsDayPanelConstraints.fill = GridBagConstraints.BOTH;			appointmentsDayJPanel.add(appointments("DAY", selectedAppointmentProviders, ((Calendar) (appointment.elementAt(1))).get(((Calendar) (appointment.elementAt(1))).DAY_OF_YEAR), ((Calendar) (appointment.elementAt(1))).get(((Calendar) (appointment.elementAt(1))).YEAR)), appointmentsDayPanelConstraints);			validate();			repaint();		}	}	private Vector<Object> validateAndReturnAppointment() {		Vector<Object> appointment = new Vector<Object>();		Calendar pAppointmentCalendar = Calendar.getInstance();		int appointmentHour;		int appointmentMinute = Integer.parseInt(appointmentCalendarMinuteJTextField.getText());		String appointmentAmPm = appointmentCalendarAmPmJTextField.getText();		String appointmentMonthString = appointmentCalendarMonthJTextField.getText();		int appointmentAmPmInt;		String appointmentDayOfWeek = appointmentCalendarDayOfWeekJTextField.getText();		int appointmentDayOfWeekInt;		int appointmentDayOfMonth = Integer.parseInt(appointmentCalendarDayOfMonthJTextField.getText());		int appointmentMonthInt;		String appointmentYearString = appointmentCalendarYearJTextField.getText();		int appointmentYear;		try {			appointmentHour = Integer.parseInt(appointmentCalendarHourJTextField.getText().trim());			if (appointmentAmPm.equals("PM") && 0 < appointmentHour && appointmentHour < 13) {				if (appointmentHour == 12) {					appointmentHour = 12;				} else {					appointmentHour = appointmentHour + 12;				}				pAppointmentCalendar.roll(pAppointmentCalendar.HOUR_OF_DAY, appointmentHour - pAppointmentCalendar.get(pAppointmentCalendar.HOUR_OF_DAY));			} else if (appointmentAmPm.equals("AM") && -1 < appointmentHour && appointmentHour < 13) {				if (appointmentHour == 12) {					appointmentHour = 0;				}				pAppointmentCalendar.roll(pAppointmentCalendar.HOUR_OF_DAY, appointmentHour - pAppointmentCalendar.get(pAppointmentCalendar.HOUR_OF_DAY));			} else if (-1 < appointmentHour && appointmentHour < 25) {				if (appointmentHour == 24) {					appointmentHour = 0;				}				pAppointmentCalendar.roll(pAppointmentCalendar.HOUR_OF_DAY, appointmentHour - pAppointmentCalendar.get(pAppointmentCalendar.HOUR_OF_DAY));			}		} catch (Exception e) {			e.printStackTrace();			appointmentCalendarHourJTextField.setBackground(invalidePinkFieldColor);			addTalkbackText("Please enter a valide " + appointmentAmPm + " hour.", null, true);			return null;		}		try {			appointmentMinute = Integer.parseInt(appointmentCalendarMinuteJTextField.getText());			if (0 <= appointmentMinute && appointmentMinute <= 59) {				pAppointmentCalendar.set(pAppointmentCalendar.MINUTE, appointmentMinute);			} else {				appointmentCalendarMinuteJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valide time in the minutes field.", null, true);				return null;			}		} catch (Exception e) {			appointmentCalendarMinuteJTextField.setBackground(invalidePinkFieldColor);			addTalkbackText("Please enter a valide time in the minutes field.", null, true);			return null;		}		if (appointmentAmPm.equals("AM")) {			pAppointmentCalendar.set(pAppointmentCalendar.AM_PM, 0);		} else if (appointmentAmPm.equals("PM")) {			pAppointmentCalendar.set(pAppointmentCalendar.AM_PM, 1);		}		if (appointmentDayOfWeek.toUpperCase().equals("SUNDAY")) {			appointmentDayOfWeekInt = 1;		} else if (appointmentDayOfWeek.toUpperCase().equals("MONDAY")) {			appointmentDayOfWeekInt = 2;		} else if (appointmentDayOfWeek.toUpperCase().equals("TUESDAY")) {			appointmentDayOfWeekInt = 3;		} else if (appointmentDayOfWeek.toUpperCase().equals("WEDNESDAY")) {			appointmentDayOfWeekInt = 4;		} else if (appointmentDayOfWeek.toUpperCase().equals("THURSDAY")) {			appointmentDayOfWeekInt = 5;		} else if (appointmentDayOfWeek.toUpperCase().equals("FRIDAY")) {			appointmentDayOfWeekInt = 6;		} else if (appointmentDayOfWeek.toUpperCase().equals("SATURDAY")) {			appointmentDayOfWeekInt = 7;		} else {			appointmentCalendarDayOfWeekJTextField.setBackground(invalidePinkFieldColor);			addTalkbackText("Please enter a valide day of the week (i.e., \"Monday.\"", null, true);			return null;		}		System.out.println("E pAppointmentCalendar.DAY_OF_YEAR: " + pAppointmentCalendar.get(pAppointmentCalendar.DAY_OF_YEAR));		try {			if (appointmentMonthString.toUpperCase().equals("JANUARY")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 0);			} else if (appointmentMonthString.toUpperCase().equals("FEBRURARY")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 1);			} else if (appointmentMonthString.toUpperCase().equals("MARCH")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 2);			} else if (appointmentMonthString.toUpperCase().equals("APRIL")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 3);			} else if (appointmentMonthString.toUpperCase().equals("MAY")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 4);			} else if (appointmentMonthString.toUpperCase().equals("JUNE")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 5);			} else if (appointmentMonthString.toUpperCase().equals("JULY")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 6);			} else if (appointmentMonthString.toUpperCase().equals("AUGUST")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 7);			} else if (appointmentMonthString.toUpperCase().equals("SEPTEMBER")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 8);			} else if (appointmentMonthString.toUpperCase().equals("OCTOBER")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 9);			} else if (appointmentMonthString.toUpperCase().equals("NOVEMBER")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 10);			} else if (appointmentMonthString.toUpperCase().equals("DECEMBER")) {				pAppointmentCalendar.set(pAppointmentCalendar.MONTH, 11);			} else {				return null;			}		} catch (Exception e) {			e.printStackTrace();			appointmentCalendarMonthJTextField.setBackground(invalidePinkFieldColor);			addTalkbackText("Please enter a valide month", null, true);			return null;		}		try {			appointmentYear = Integer.parseInt(appointmentCalendarYearJTextField.getText());			if (2012 <= appointmentYear && appointmentYear <= 2050) {				pAppointmentCalendar.set(pAppointmentCalendar.YEAR, appointmentYear);				System.out.println("pAppointmentCalendar.get(pAppointmentCalendar.YEAR): " + pAppointmentCalendar.get(pAppointmentCalendar.YEAR));			} else {				System.out.println("setBackground(invalidePinkFieldColor): ");				appointmentCalendarYearJTextField.setBackground(invalidePinkFieldColor);				addTalkbackText("Please enter a valide year between 2012 and 2050", null, true);				return null;			}		} catch (Exception e) {			e.printStackTrace();			System.out.println("e: " + e);			appointmentCalendarYearJTextField.setBackground(invalidePinkFieldColor);			addTalkbackText("Please enter a valide year between 2012 and 2050", null, true);			return null;		}		System.out.println("G pAppointmentCalendar.DAY_OF_YEAR: " + pAppointmentCalendar.get(pAppointmentCalendar.DAY_OF_YEAR));		System.out.println("Day of month before setting day_of_year");		System.out.println("  appointmentDayOfMonth: " + appointmentDayOfMonth);		System.out.println("  appointmentYear: " + appointmentYear);		System.out.println("1 pAppointmentCalendar.DAY_OF_YEAR: " + pAppointmentCalendar.get(pAppointmentCalendar.DAY_OF_YEAR));		System.out.println("  pAppointmentCalendar.getActualMaximum(pAppointmentCalendar.DAY_OF_YEAR): " + pAppointmentCalendar.getActualMaximum(pAppointmentCalendar.DAY_OF_YEAR));		pAppointmentCalendar.set(pAppointmentCalendar.DAY_OF_YEAR, calculateAppointmentDayOfYear(appointmentDayOfMonth, pAppointmentCalendar.get(pAppointmentCalendar.MONTH), appointmentYear));		appointment.add(Access.loggedOnUserID);		appointment.add(pAppointmentCalendar);		appointment.add(selectedAppointmentProviders);		appointment.add(appointmentsPatientFamilyNameJTextField.getText());		appointment.add(appointmentsPatientGivenNameJTextField.getText());		appointment.add(appointmentsPatientMiddleInitialOrNameJTextField.getText());		appointment.add(appointmentsPatientNameSuffixJTextField.getText());		appointment.add(appointmentsPatientNameDegreeJTextField.getText());		appointment.add(appointmentsPatientPhoneNumberJTextField.getText());		appointment.add(appointmentsPatientPhoneNumberJTextField.getText());		appointment.add(appointmentsLengthJTextField.getText());		System.out.println("F pAppointmentCalendar.DAY_OF_YEAR: " + pAppointmentCalendar.get(pAppointmentCalendar.DAY_OF_YEAR));		return appointment;	}	private void setAppointmentObjectsEnabled(boolean enable) {		Color appointmentObjectColor = Color.WHITE;		if (!enable) {			appointmentObjectColor = Color.LIGHT_GRAY;		}		appointmentsEmailReminderJButton.setEnabled(enable);		appointmentsPhoneReminderJButton.setEnabled(enable);		appointmentCalendarComma1AndSpaceJTextField.setEnabled(enable);		appointmentCalendarMonthJTextField.setEnabled(enable);		appointmentCalendarDayOfMonthJTextField.setEnabled(enable);		appointmentCalendarComma2JTextField.setEnabled(enable);		appointmentCalendarYearJTextField.setEnabled(enable);		appointmentCalendarHourJTextField.setEnabled(enable);		appointmentCalendarColonJTextField.setEnabled(enable);		appointmentCalendarMinuteJTextField.setEnabled(enable);		appointmentsPatientSocialSecurityNumberJTextField.setEnabled(enable);		appointmentsPatientGivenNameJTextField.setEnabled(enable);		appointmentsPatientMiddleInitialOrNameJTextField.setEnabled(enable);		appointmentsPatientFamilyNameJTextField.setEnabled(enable);		appointmentsPatientNameDegreeJTextField.setEnabled(enable);		appointmentsDayOfMonthViewingOptionJToggleButton.setEnabled(enable);		appointmentsDayOfMonthViewingOptionJToggleButton.setEnabled(enable);		appointmentsWeekViewingOptionJToggleButton.setEnabled(enable);		appointmentsMonthViewingOptionJToggleButton.setEnabled(enable);		appointmentsPatientNameSuffixJTextField.setEnabled(enable);		appointmentsAppointmentTypeJTextField.setEnabled(enable);		appointmentsPatientPhoneNumberJTextField.setEnabled(enable);		appointmentsPatientEmailJTextField.setEnabled(enable);		appointmentsPatientSexJTextField.setEnabled(enable);		appointmentsLengthJTextField.setEnabled(enable);		appointmentsPatientAddressStreetOrMailingAddressJTextField.setEnabled(enable);		appointmentsPatientAddressStreetNameJTextField.setEnabled(enable);		appointmentsPatientAddressDwellingNumberJTextField.setEnabled(enable);		appointmentsPatientAddressCityJTextField.setEnabled(enable);		appointmentsPatientAddressStateOrProvinceJTextField.setEnabled(enable);		appointmentsPatientAddressZipOrPostalCodeJTextField.setEnabled(enable);		appointmentsPatientAddressCountryJTextField.setEnabled(enable);		appointmentsEmailReminderJButton.setBackground(appointmentObjectColor);		appointmentsPhoneReminderJButton.setBackground(appointmentObjectColor);		appointmentCalendarDayOfWeekJTextField.setBackground(appointmentObjectColor);		appointmentCalendarComma1AndSpaceJTextField.setBackground(appointmentObjectColor);		appointmentCalendarMonthJTextField.setBackground(appointmentObjectColor);		appointmentCalendarDayOfMonthJTextField.setBackground(appointmentObjectColor);		appointmentCalendarComma2JTextField.setBackground(appointmentObjectColor);		appointmentCalendarYearJTextField.setBackground(appointmentObjectColor);		appointmentCalendarHourJTextField.setBackground(appointmentObjectColor);		appointmentCalendarColonJTextField.setBackground(appointmentObjectColor);		appointmentCalendarMinuteJTextField.setBackground(appointmentObjectColor);		appointmentCalendarAmPmJTextField.setBackground(appointmentObjectColor);		appointmentsPatientSocialSecurityNumberJTextField.setBackground(appointmentObjectColor);		appointmentsPatientGivenNameJTextField.setBackground(appointmentObjectColor);		appointmentsPatientMiddleInitialOrNameJTextField.setBackground(appointmentObjectColor);		appointmentsPatientFamilyNameJTextField.setBackground(appointmentObjectColor);		appointmentsPatientNameDegreeJTextField.setBackground(appointmentObjectColor);		appointmentsDayOfMonthViewingOptionJToggleButton.setBackground(appointmentObjectColor);		appointmentsDayOfMonthViewingOptionJToggleButton.setBackground(appointmentObjectColor);		appointmentsWeekViewingOptionJToggleButton.setBackground(appointmentObjectColor);		appointmentsMonthViewingOptionJToggleButton.setBackground(appointmentObjectColor);		appointmentsPatientNameSuffixJTextField.setBackground(appointmentObjectColor);		appointmentsAppointmentTypeJTextField.setBackground(appointmentObjectColor);		appointmentsPatientPhoneNumberJTextField.setBackground(appointmentObjectColor);		appointmentsPatientEmailJTextField.setBackground(appointmentObjectColor);		appointmentsPatientSexJTextField.setBackground(appointmentObjectColor);		appointmentsLengthJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressStreetOrMailingAddressJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressStreetNameJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressDwellingNumberJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressCityJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressStateOrProvinceJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressZipOrPostalCodeJTextField.setBackground(appointmentObjectColor);		appointmentsPatientAddressCountryJTextField.setBackground(appointmentObjectColor);	}	public void rollAndFillCalendar(Calendar calendar, String actionCommand, int amountToRoll, JTextField dayOfWeekJTextField, JTextField monthJTextField, JTextField dayOfMonthJTextField, JTextField yearJTextField, JTextField hourJTextField, JTextField minuteJTextField, JTextField aMPMJTextField) {		if (null != actionCommand) {			int calendarObjectToRoll = -1;			if (actionCommand.contains("DayOfWeek")) {				calendarObjectToRoll = calendar.DAY_OF_WEEK;			} else if (actionCommand.contains("CalendarMonth")) {				calendarObjectToRoll = calendar.MONTH;			} else if (actionCommand.contains("CalendarDayOfMonth")) {				calendarObjectToRoll = calendar.DAY_OF_MONTH;			} else if (actionCommand.contains("CalendarYear")) {				calendarObjectToRoll = calendar.YEAR;			} else if (actionCommand.contains("CalendarHour")) {				calendarObjectToRoll = calendar.HOUR;			} else if (actionCommand.contains("CalendarMinute")) {				calendarObjectToRoll = calendar.MINUTE;			} else if (actionCommand.contains("CalendarAmPm")) {				calendarObjectToRoll = calendar.AM_PM;			}			if (calendarObjectToRoll != -1) {				calendar.roll(calendarObjectToRoll, amountToRoll);			}		}		dayOfWeekJTextField.setText(dayOfWeek[calendar.get(Calendar.DAY_OF_WEEK) - 1]);		monthJTextField.setText(month[calendar.get(Calendar.MONTH)]);		dayOfMonthJTextField.setText(String.valueOf(calendar.get(Calendar.DAY_OF_MONTH)));		yearJTextField.setText(String.valueOf(calendar.get(Calendar.YEAR)));		if (calendar.get(Calendar.HOUR) == 0) {			hourJTextField.setText("12");		} else {			if (String.valueOf(calendar.get(Calendar.MINUTE)).length() < 2) {				hourJTextField.setText(" " + String.valueOf(calendar.get(Calendar.HOUR)));			} else {				hourJTextField.setText(String.valueOf(calendar.get(Calendar.HOUR)));			}		}		if (String.valueOf(calendar.get(Calendar.MINUTE)).length() < 2) {			minuteJTextField.setText("0" + String.valueOf(calendar.get(Calendar.MINUTE)));		} else {			minuteJTextField.setText(String.valueOf(calendar.get(Calendar.MINUTE)));		}		aMPMJTextField.setText(aMPM[calendar.get(Calendar.AM_PM)]);		if (monthJTextField.getBackground().equals(invalidePinkFieldColor)) {			monthJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect month field was changed back to it's original value.", null, true);		} else if (dayOfMonthJTextField.getBackground().equals(invalidePinkFieldColor)) {			dayOfMonthJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect day of the month was changed back to it's original value.", null, true);		} else if (yearJTextField.getBackground().equals(invalidePinkFieldColor)) {			yearJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect year field was changed back to it's original value.", null, true);		} else if (hourJTextField.getBackground().equals(invalidePinkFieldColor)) {			hourJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect hour field was changed back to it's original value.", null, true);		} else if (minuteJTextField.getBackground().equals(invalidePinkFieldColor)) {			minuteJTextField.setBackground(Color.WHITE);			addTalkbackText("The incorrect minute field was changed back to it's original value", null, true);		}	}	public int calculateAppointmentDayOfYear(int appointmentDayOfMonth, int appointmentMonth, int appointmentYear) {		int pAppointmentDayOfYear = 0;		int daysInYearBeforeMonthBegan = -1;		int februaryDays;		if (appointmentYear == 2012 || appointmentYear == 2016 || appointmentYear == 2020 || appointmentYear == 2024 || appointmentYear == 2028 || appointmentYear == 2032 || appointmentYear == 2040) {			februaryDays = 29;		} else {			februaryDays = 28;		}		if (appointmentMonth == 0) {			daysInYearBeforeMonthBegan = 0;		} else if (appointmentMonth == 1) {			daysInYearBeforeMonthBegan = 31;		} else if (appointmentMonth == 2) {			daysInYearBeforeMonthBegan = 31 + februaryDays;		} else if (appointmentMonth == 3) {			daysInYearBeforeMonthBegan = 62 + februaryDays;		} else if (appointmentMonth == 4) {			daysInYearBeforeMonthBegan = 92 + februaryDays;		} else if (appointmentMonth == 5) {			daysInYearBeforeMonthBegan = 123 + februaryDays;		} else if (appointmentMonth == 6) {			daysInYearBeforeMonthBegan = 153 + februaryDays;		} else if (appointmentMonth == 7) {			daysInYearBeforeMonthBegan = 184 + februaryDays;		} else if (appointmentMonth == 8) {			daysInYearBeforeMonthBegan = 215 + februaryDays;		} else if (appointmentMonth == 9) {			daysInYearBeforeMonthBegan = 245 + februaryDays;		} else if (appointmentMonth == 10) {			daysInYearBeforeMonthBegan = 276 + februaryDays;		} else if (appointmentMonth == 11) {			daysInYearBeforeMonthBegan = 306 + februaryDays;		}		pAppointmentDayOfYear = daysInYearBeforeMonthBegan + appointmentDayOfMonth;		return pAppointmentDayOfYear;	}	public static Vector<Vector<String>> parseCodeSetQuery(String queryText) {		String inputQueryText = queryText;		SystemWindow.println("inputQueryText: " + inputQueryText);		Vector<Vector<String>> codeSetQueries = new Vector<Vector<String>>();		queryText = queryText.trim();		while (queryText.contains("  ")) {			queryText = queryText.replace("  ", " ");		}		if (queryText.toUpperCase().startsWith("OR ")) {			queryText = queryText.substring(3);		}		if (queryText.toUpperCase().endsWith(" OR")) {			queryText = queryText.substring(0, queryText.length() - 3);		}		if (queryText.toUpperCase().endsWith("\"OR")) {			queryText = queryText.substring(0, queryText.length() - 2);		}		SystemWindow.println("cleansed queryText: " + queryText);		boolean invalidInput = false;		int endDeliminatorInd;		codeSetQueries.add(new Vector<String>());		while (!invalidInput && !queryText.equals("")) {			if (queryText.startsWith("\"")) {				endDeliminatorInd = queryText.indexOf("\"", 1);				if (endDeliminatorInd == -1) {					invalidInput = true;				} else {					if (!queryText.substring(1, endDeliminatorInd).replace("\"", "").equals("")) {						codeSetQueries.lastElement().add(queryText.substring(1, endDeliminatorInd));						if (codeSetQueries.lastElement().lastElement().contains("\"")) {							invalidInput = true;						}						queryText = queryText.replace(queryText.substring(0, endDeliminatorInd + 1), "");					}				}			} else {				endDeliminatorInd = queryText.indexOf(" ", 1);				if (endDeliminatorInd == -1) {					endDeliminatorInd = queryText.length();				}				codeSetQueries.lastElement().add(queryText.substring(0, endDeliminatorInd));				if (codeSetQueries.lastElement().lastElement().contains("\"")) {					invalidInput = true;				}				queryText = queryText.replace(queryText.substring(0, endDeliminatorInd), "");			}			if (queryText.toUpperCase().startsWith(" OR ")) {				queryText = queryText.substring(4);			} else if (queryText.toUpperCase().startsWith(" OR\"")) {				queryText = queryText.substring(3);			} else if (queryText.toUpperCase().startsWith("OR\"")) {				queryText = queryText.substring(2);			} else if (!queryText.equals("")) {				codeSetQueries.add(new Vector<String>());			}			queryText = queryText.trim();		}		String query = "";		if (invalidInput) {			SystemWindow.println("PracticeAssistaneFrame invalidInput = true");			return null;		} else {			int ind1 = 0;			int ind2;			while (ind1 < codeSetQueries.size()) {				ind2 = 0;				while (ind2 < codeSetQueries.elementAt(ind1).size()) {					if (ind2 > 0) {						query = query + " or";					}					if (codeSetQueries.elementAt(ind1).elementAt(ind2).contains(" ")) {						query = query + " \"" + codeSetQueries.elementAt(ind1).elementAt(ind2) + "\"";					} else {						query = query + " " + codeSetQueries.elementAt(ind1).elementAt(ind2);					}					ind2++;				}				ind1++;			}			query = query.trim();		}		if (inputQueryText.equals("")) {			codeSetQueries.lastElement().add("");			return codeSetQueries;		} else if (!query.equals(inputQueryText)) {			queryToFindInCodeSetJTextField.setText(query);		}		return codeSetQueries;	}	public void fillOutputDirectoriesJPanel(int claimsDirectoryInd) {		outputNetworkPanelScrollPaneJPanel.removeAll();		int outerInd = 0;		int innerInd = 0;		int outerOutputFileSize = ChartingWindow.medicalOutputFile.size();		int innerOutputFileSize;		while (outerInd < outerOutputFileSize) {			innerOutputFileSize = ChartingWindow.medicalOutputFile.elementAt(outerInd).size();			innerInd = 0;			while (innerInd < innerOutputFileSize) {				SystemWindow.println("Charting.medicalOutputFile.elementAt(" + outerInd + ").elementAt(" + innerInd + ":" + ChartingWindow.medicalOutputFile.elementAt(outerInd).elementAt(innerInd));				innerInd++;			}			outerInd++;		}		outputNetworkPanelScrollPaneJPanel.add(new JLabel("claimsDirectoryInd: " + claimsDirectoryInd));		outputNetworkPanelScrollPaneJPanel.validate();		outputNetworkPanelScrollPaneJPanel.repaint();	}	public void fillMasterUserIndex() {		int numTotalUsers = ((Vector) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(0))).size();		System.out.println("numTotalUsers: " + numTotalUsers);		int userIDInd = 1;		String nextUserID = null;		masterUserIndexJPanelConstraints.gridy = 1;		JButton nameJButton;		JButton userIDJButton;		masterUserIndexJPanel.removeAll();		while (userIDInd <= numTotalUsers) {			if (((String[][][]) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(0)))[userIDInd][0][0] != null) {				nextUserID = ((String[][][]) (((Vector) (Access.rootAdministrator.elementAt(3))).elementAt(0)))[userIDInd][0][0];			}			nameJButton = new JButton((Access.getUser(nextUserID, "prefix") + " " + Access.getUser(nextUserID, "firstName") + " " + Access.getUser(nextUserID, "secondName") + " " + Access.getUser(nextUserID, "lastName") + " " + Access.getUser(nextUserID, "suffix") + Access.lastDot(Access.getUser(nextUserID, "suffix"))).replace("  ", " "));			nameJButton.addActionListener(this);			nameJButton.setActionCommand("USERSELECTED");			nameJButton.setBorder(null);			nameJButton.setContentAreaFilled(false);			nameJButton.setBackground(new Color(128, 128, 128, 0));			userIDJButton = new JButton(Access.getUser(nextUserID, "password"));			userIDJButton.addActionListener(this);			userIDJButton.setActionCommand("USERSELECTED");			userIDJButton.setBorder(null);			userIDJButton.setContentAreaFilled(false);			userIDJButton.setBackground(new Color(128, 128, 128, 0));			masterUserIndexJPanelConstraints.gridy++;			masterUserIndexJPanelConstraints.gridx = 0;			masterUserIndexJPanel.add(nameJButton, masterUserIndexJPanelConstraints);			masterUserIndexJPanelConstraints.gridx = 1;			masterUserIndexJPanel.add(userIDJButton, masterUserIndexJPanelConstraints);			userIDInd++;		}		addTalkbackText("Master User Index", null, true);		validate();		repaint();	}	public JPanel codeSetPanel(String callingWindow, String codeSetPanelIdentifier, Vector<Vector<String>> searchQuery, int columnNumber) {		Vector<Vector<String>> codeSetVector = null;		JPanel medicalCodeSetScrollPaneJPanel = new JPanel(new GridBagLayout());		JPanel medicalCodeSetJPanel = new JPanel(new GridBagLayout());		JPanel medicalCodeSetPanelBaseJPanel = new JPanel(new GridBagLayout());		JPanel medicalCodeSetPanelPusherJPanel = new JPanel(new GridBagLayout());		JPanel codingDictionaryColumnHeaderJPanel = new JPanel(new GridBagLayout());		JPanel medicalCodeSetPanelRowHeaderJPanel = new JPanel(new GridBagLayout());		JPanel medicalCodeSetPanelRowHeaderPanelPusherJPanel = new JPanel(new GridBagLayout());		JPanel medicalCodeSetPanelRowHeaderPanelBaseJPanel = new JPanel(new GridBagLayout());		JPanel topLeftCornerJPanel = new JPanel(new GridBagLayout());		GridBagConstraints topLeftCornerPanelConstraints = new GridBagConstraints();		JScrollPane medicalCodeSetJScrollPane = new JScrollPane(medicalCodeSetPanelBaseJPanel);		Color panelBackgroundColor;		Color greenColor;		Color orangeColor;		if (callingWindow.equals("systemFrame")) {			panelBackgroundColor = Color.WHITE;			greenColor = Color.BLACK;			orangeColor = Color.BLACK;		} else {			panelBackgroundColor = Color.BLACK;			greenColor = Color.GREEN;			orangeColor = Color.ORANGE;		}		GridBagConstraints medicalCodeSetPanelConstraints = new GridBagConstraints();		GridBagConstraints codingDictionaryPanelHeaderConstraints = new GridBagConstraints();		GridBagConstraints medicalCodeSetPanelRowHeaderPanelConstraints = new GridBagConstraints();		GridBagConstraints medicalCodeSetPanelBasePanelConstraints = new GridBagConstraints();		GridBagConstraints medicalCodeSetPanelRowHeaderPanelBasePanelConstraints = new GridBagConstraints();		medicalCodeSetScrollPaneJPanel.setBackground(panelBackgroundColor);		codingDictionaryColumnHeaderJPanel.setBackground(panelBackgroundColor);		medicalCodeSetPanelRowHeaderJPanel.setBackground(panelBackgroundColor);		medicalCodeSetJPanel.setBackground(panelBackgroundColor);		topLeftCornerJPanel.setBackground(panelBackgroundColor);		medicalCodeSetPanelPusherJPanel.setBackground(panelBackgroundColor);		medicalCodeSetPanelBaseJPanel.setBackground(panelBackgroundColor);		medicalCodeSetPanelRowHeaderPanelPusherJPanel.setBackground(panelBackgroundColor);		medicalCodeSetPanelRowHeaderPanelBaseJPanel.setBackground(panelBackgroundColor);		medicalCodeSetPanelBasePanelConstraints.gridy = 0;		medicalCodeSetPanelBaseJPanel.add(medicalCodeSetJPanel, medicalCodeSetPanelBasePanelConstraints);		medicalCodeSetPanelBasePanelConstraints.gridy = 1;		medicalCodeSetPanelBasePanelConstraints.weighty = 1;		medicalCodeSetPanelBasePanelConstraints.weightx = 1;		medicalCodeSetPanelBaseJPanel.add(medicalCodeSetPanelPusherJPanel, medicalCodeSetPanelBasePanelConstraints);		medicalCodeSetPanelRowHeaderPanelBasePanelConstraints.gridy = 0;		medicalCodeSetPanelRowHeaderPanelBaseJPanel.add(medicalCodeSetPanelRowHeaderJPanel, medicalCodeSetPanelRowHeaderPanelBasePanelConstraints);		medicalCodeSetPanelRowHeaderPanelBasePanelConstraints.gridy = 1;		medicalCodeSetPanelRowHeaderPanelBasePanelConstraints.weighty = 1;		medicalCodeSetPanelRowHeaderPanelBasePanelConstraints.weightx = 1;		medicalCodeSetPanelRowHeaderPanelBaseJPanel.add(medicalCodeSetPanelRowHeaderPanelPusherJPanel, medicalCodeSetPanelRowHeaderPanelBasePanelConstraints);		medicalCodeSetPanelConstraints.gridy = 1;		medicalCodeSetPanelConstraints.gridx = 0;		medicalCodeSetPanelRowHeaderPanelConstraints.gridy = 1;		codingDictionaryPanelHeaderConstraints.anchor = GridBagConstraints.WEST;		medicalCodeSetPanelConstraints.anchor = GridBagConstraints.WEST;		topLeftCornerPanelConstraints.anchor = GridBagConstraints.WEST;		medicalCodeSetPanelRowHeaderPanelConstraints.insets = new Insets(0, 4, 0, 4);		codingDictionaryPanelHeaderConstraints.insets = new Insets(0, 4, 0, 4);		medicalCodeSetPanelConstraints.insets = new Insets(0, 4, 0, 4);		topLeftCornerPanelConstraints.insets = new Insets(0, 4, 0, 4);		if ((codeSetPanelIdentifier.equals("HL7_2.3.1") || codeSetPanelIdentifier.equals("CPT2009")) && searchQuery.elementAt(0).elementAt(0).equals("")) {			codeSetVector = tokenizeDatabase(Io.databaseRecords("entire database", codeSetPanelIdentifier, null), codeSetPanelIdentifier);		} else {			codeSetVector = tokenizeDatabase(Io.databaseRecords("query", codeSetPanelIdentifier, searchQuery), codeSetPanelIdentifier);		}		if (codeSetVector != null && !codeSetVector.elementAt(0).elementAt(0).equals(null) && codeSetVector.elementAt(0).elementAt(0).equals("tooManyCodes")) {			addTalkbackText("Too many records match the query, please enter a shorter query", null, true);			medicalCodeSetScrollPaneJPanel.setBackground(Color.BLACK);			medicalCodeSetScrollPaneJPanel.add(tooManyCodesJLabel);		} else if (codeSetVector != null) {			int totalLines = codeSetVector.size();			int numTokensPerLine = ((Vector) (codeSetVector.elementAt(0))).size();			int[] maxTokenLength = new int[numTokensPerLine];			String deliminatedToken;			maxLineInd = totalLines;			int lineInd = 0;			int tokenInd = 0;			while (tokenInd < numTokensPerLine) {				deliminatedToken = (String) (((Vector<String>) (codeSetVector.elementAt(lineInd))).elementAt(tokenInd));				SystemWindow.println("tokenInd: " + tokenInd + "; deliminatedToken: " + deliminatedToken);				JLabel headerJLabel = new JLabel("< " + deliminatedToken + " >");				maxTokenLength[tokenInd] = deliminatedToken.length();				headerJLabel.setFont(new Font(Font.MONOSPACED, Font.BOLD, 18));				if (!callingWindow.equals("systemFrame")) {					headerJLabel.setForeground(orangeColor);				}				if (tokenInd == 0) {					topLeftCornerJPanel.add(headerJLabel, topLeftCornerPanelConstraints);				} else {					codingDictionaryPanelHeaderConstraints.gridx = tokenInd;					codingDictionaryColumnHeaderJPanel.add(headerJLabel, codingDictionaryPanelHeaderConstraints);				}				tokenInd++;			}			lineInd = 1;			while (lineInd < maxLineInd) {				tokenInd = 0;				while (tokenInd < numTokensPerLine) {					deliminatedToken = (String) (((Vector<String>) (codeSetVector.elementAt(lineInd))).elementAt(tokenInd));					if (maxTokenLength[tokenInd] < deliminatedToken.length()) {						maxTokenLength[tokenInd] = deliminatedToken.length();					}					JLabel codeElementIdentifierJLabel = new JLabel("< " + deliminatedToken + " >");					codeElementIdentifierJLabel.addMouseListener(Device.device.workspace.systemWindow);					codeElementIdentifierJLabel.setName("codeElementIdentifierJLabel" + "|" + (String) (((Vector<String>) (codeSetVector.elementAt(lineInd))).elementAt(0)));					codeElementIdentifierJLabel.setFont(new Font(Font.MONOSPACED, Font.BOLD, 18));					if (tokenInd == 0) {						codeElementIdentifierJLabel.setForeground(orangeColor);						medicalCodeSetPanelRowHeaderPanelConstraints.gridy++;						medicalCodeSetPanelRowHeaderPanelConstraints.anchor = GridBagConstraints.WEST;						medicalCodeSetPanelRowHeaderJPanel.add(codeElementIdentifierJLabel, medicalCodeSetPanelRowHeaderPanelConstraints);					} else {						codeElementIdentifierJLabel.setForeground(greenColor);						medicalCodeSetJPanel.add(codeElementIdentifierJLabel, medicalCodeSetPanelConstraints);						medicalCodeSetPanelConstraints.gridx++;					}					tokenInd++;				}				medicalCodeSetPanelConstraints.gridy++;				medicalCodeSetPanelConstraints.gridx = 0;				lineInd++;			}			String string;			int ind = 0;			while (ind < codingDictionaryColumnHeaderJPanel.getComponentCount()) {				string = ((JLabel) (codingDictionaryColumnHeaderJPanel.getComponent(ind))).getText();				while (maxTokenLength[ind + 1] > string.length()) {					string = string + " ";				}				((JLabel) (codingDictionaryColumnHeaderJPanel.getComponent(ind))).setText(string);				ind++;			}			medicalCodeSetPanelConstraints.gridy = 0;			medicalCodeSetPanelConstraints.gridx = 0;			JLabel spacerJLabel;			String spacerString;			tokenInd = 0;			while (tokenInd < numTokensPerLine) {				spacerString = " ";				while (spacerString.length() < maxTokenLength[tokenInd]) {					spacerString = spacerString + " ";				}				if (tokenInd == 0) {					medicalCodeSetPanelRowHeaderPanelConstraints.gridy = 0;					spacerJLabel = new JLabel(spacerString);					spacerJLabel.setFont(new Font(Font.MONOSPACED, Font.BOLD, 18));					spacerJLabel.setForeground(orangeColor);					medicalCodeSetPanelRowHeaderJPanel.add(spacerJLabel, medicalCodeSetPanelRowHeaderPanelConstraints);				} else {					spacerJLabel = new JLabel(spacerString);					spacerJLabel.setFont(new Font(Font.MONOSPACED, Font.BOLD, 18));					spacerJLabel.setForeground(greenColor);					medicalCodeSetJPanel.add(spacerJLabel, medicalCodeSetPanelConstraints);					medicalCodeSetPanelConstraints.gridx++;				}				tokenInd++;			}			medicalCodeSetJScrollPane.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);			medicalCodeSetJScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);			medicalCodeSetJScrollPane.setCorner("UPPER_LEFT_CORNER", topLeftCornerJPanel);			medicalCodeSetJScrollPane.setRowHeaderView(medicalCodeSetPanelRowHeaderPanelBaseJPanel);			medicalCodeSetJScrollPane.setColumnHeaderView(codingDictionaryColumnHeaderJPanel);			medicalCodeSetJScrollPane.setPreferredSize(medicalCodeSetScrollPaneDimension);			medicalCodeSetJScrollPane.setSize(medicalCodeSetScrollPaneDimension);			anotherPanelConstraints.weighty = 1;			anotherPanelConstraints.weightx = 1;			anotherPanelConstraints.fill = GridBagConstraints.BOTH;			medicalCodeSetScrollPaneJPanel.add(medicalCodeSetJScrollPane, anotherPanelConstraints);		} else {			addTalkbackText("No codes matching query found", null, true);			medicalCodeSetScrollPaneJPanel.setBackground(Color.BLACK);			medicalCodeSetScrollPaneJPanel.add(noCodesJLabel);		}		return medicalCodeSetScrollPaneJPanel;	}	public static Vector<Vector<String>> tokenizeDatabase(Vector<String> codeSetAsLines, String codeSetIdentifier) {		if (codeSetAsLines == null) {			return null;		} else {			Vector<Vector<String>> codeSetVector = new Vector<Vector<String>>();			if (codeSetAsLines.elementAt(0).equals("tooManyCodes")) {				SystemWindow.println("tooManyCodes");				codeSetVector.add(new Vector<String>());				codeSetVector.elementAt(0).add("tooManyCodes");				return codeSetVector;			} else {				int rightDeliminatorIndice;				boolean stopReadingLinetokens;				Vector<String> codeFieldLineVector = new Vector<String>();				int leftDeliminatorIndice;				String deliminator;				int lineInd = 0;				String codeLineString = "";				if (codeSetIdentifier.equals("RXNCONSO09072010")) {					deliminator = "|";				} else {					deliminator = "\t";				}				if (codeSetIdentifier.equals("ICD10")) {					while (lineInd < codeSetAsLines.size()) {						codeLineString = codeSetAsLines.elementAt(lineInd);						codeFieldLineVector.add(codeLineString.substring(0, 7).trim());						codeFieldLineVector.add(codeLineString.substring(8).trim());						codeSetVector.add(((Vector<String>) (codeFieldLineVector.clone())));						codeFieldLineVector.clear();						lineInd++;					}				} else if (codeSetIdentifier.equals("LOINC2.32")) {					SystemWindow.println("codeSetIdentifier.equals(\"LOINC2.32\"");					while (lineInd < codeSetAsLines.size()) {						codeLineString = codeSetAsLines.elementAt(lineInd);						leftDeliminatorIndice = 0;						String deliminatedToken = null;						if (codeLineString != null) {							rightDeliminatorIndice = codeLineString.indexOf(deliminator);							stopReadingLinetokens = false;							while (!stopReadingLinetokens) {								if (rightDeliminatorIndice == -1) {									stopReadingLinetokens = true;									deliminatedToken = codeLineString;									deliminatedToken = deliminatedToken.trim();								} else if (leftDeliminatorIndice == rightDeliminatorIndice) {									deliminatedToken = " -";								} else {									deliminatedToken = codeLineString.substring(leftDeliminatorIndice, rightDeliminatorIndice);									deliminatedToken = deliminatedToken.trim();								}								leftDeliminatorIndice = rightDeliminatorIndice + 1;								rightDeliminatorIndice = codeLineString.indexOf(deliminator, leftDeliminatorIndice);								if (deliminatedToken.startsWith("\"") && deliminatedToken.endsWith("\"")) {									codeFieldLineVector.add(deliminatedToken.substring(1, deliminatedToken.length() - 1));								} else {									codeFieldLineVector.add(deliminatedToken);								}							}						}						codeSetVector.add(((Vector<String>) (codeFieldLineVector.clone())));						codeFieldLineVector.clear();						lineInd++;					}				} else {					while (lineInd < codeSetAsLines.size()) {						codeLineString = codeSetAsLines.elementAt(lineInd);						leftDeliminatorIndice = 0;						String deliminatedToken;						if (codeLineString != null) {							rightDeliminatorIndice = codeLineString.indexOf(deliminator);							stopReadingLinetokens = false;							while (!stopReadingLinetokens) {								if (rightDeliminatorIndice == -1) {									stopReadingLinetokens = true;									deliminatedToken = codeLineString.substring(leftDeliminatorIndice);									deliminatedToken = deliminatedToken.trim();								} else if (leftDeliminatorIndice == rightDeliminatorIndice) {									deliminatedToken = " -";								} else {									deliminatedToken = codeLineString.substring(leftDeliminatorIndice, rightDeliminatorIndice);									deliminatedToken = deliminatedToken.trim();								}								leftDeliminatorIndice = rightDeliminatorIndice + 1;								rightDeliminatorIndice = codeLineString.indexOf(deliminator, leftDeliminatorIndice);								codeFieldLineVector.add(deliminatedToken);							}						}						codeSetVector.add(((Vector<String>) (codeFieldLineVector.clone())));						codeFieldLineVector.clear();						lineInd++;					}				}				if (codeSetVector.size() < 2) {					codeSetVector = null;				}				return codeSetVector;			}		}	}	public ImageIcon iconifyComponent(Component component, int iconWidth, int iconHeight) {		BufferedImage slammedBufferedImage = new BufferedImage(component.getWidth(), component.getHeight(), BufferedImage.TYPE_BYTE_BINARY);		Graphics2D g2d = slammedBufferedImage.createGraphics();		component.paint(g2d.create());		return new ImageIcon(slammedBufferedImage.getScaledInstance(iconWidth, iconHeight, slammedBufferedImage.SCALE_SMOOTH));	}	@Override	public void focusGained(FocusEvent e) {		if (e.getComponent().getName().equals("appointmentCalendarDayOfMonthJTextField")) {			appointmentCalendarDayOfMonthJTextField.setBackground(Color.WHITE);			rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);		} else if (e.getComponent().getName().equals("appointmentCalendarMonthJTextField")) {			appointmentCalendarMonthJTextField.setBackground(Color.WHITE);			rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);		} else if (e.getComponent().getName().equals("appointmentCalendarYearJTextField")) {			appointmentCalendarYearJTextField.setBackground(Color.WHITE);			rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);		} else if (e.getComponent().getName().equals("appointmentCalendarHourJTextField")) {			appointmentCalendarHourJTextField.setBackground(Color.WHITE);			rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);		} else if (e.getComponent().getName().equals("appointmentCalendarMinuteJTextField")) {			appointmentCalendarMinuteJTextField.setBackground(Color.WHITE);			rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);		}	}	@Override	public void focusLost(FocusEvent e) {		if (e.getComponent().getName().startsWith("appointmentCalendar")) {			syncAppointmentCalendarWithTalkback(((JTextField) e.getSource()));		}	}	@Override	public void keyPressed(KeyEvent e) {		if (e.getComponent().getName().startsWith("appointmentCalendar")) {			if (e.getKeyCode() == 38) {				rollAndFillCalendar(appointmentsFormCalendar, e.getComponent().getName(), 1, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);			} else if (e.getKeyCode() == 40) {				rollAndFillCalendar(appointmentsFormCalendar, e.getComponent().getName(), -1, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);			}		}	}	@Override	public void keyReleased(KeyEvent arg0) {	}	@Override	public void keyTyped(KeyEvent e) {	}	void reSize() {		pack();	}	@Override	public void mouseClicked(MouseEvent m) {		super.mouseClicked(m);		if (m.getComponent().getName().startsWith("providorGroupJToggleButton")) {			String providerIDOrName;			Vector<String> providerGroup = rootPracticeUserGroups.elementAt(Integer.parseInt(((JToggleButton) (m.getSource())).getName().substring(27)));			Vector<String> compoundProviderName;			boolean isRightClick = false;			int providerInGroupInd = 0;			while (providerInGroupInd < providerGroup.size()) {				selectedAppointmentProviders.add(providerGroup.elementAt(providerInGroupInd));				if (m.getButton() == 1) {					providerIDOrName = ((JToggleButton) (m.getSource())).getName();				} else {					providerIDOrName = getProviderName(null, providerGroup.elementAt(providerInGroupInd));				}				if (!isRightClick) {					if (m.getButton() == 1) {						isRightClick = true;					}					if (appointmentsAppointmentProvidorsJTextField.getText().equals(null) || appointmentsAppointmentProvidorsJTextField.getText().equals("")) {						appointmentsAppointmentProvidorsJTextField.setText(providerIDOrName);					} else {						JLabel providorNameJLabel = new JLabel(providerIDOrName);						providorNameJLabel.setFont(SystemWindow.systemFont);						providorNameJLabel.setForeground(SystemWindow.outputColor);						providorNameJLabel.addMouseListener(this);						providorNameJLabel.setName("providorNameJLabel");						appointmentsAppointmentProvidorsPanelConstraints.anchor = GridBagConstraints.WEST;						appointmentsAppointmentProvidorsPanelConstraints.gridy++;						appointmentsAppointmentProvidorsJPanel.add(providorNameJLabel, appointmentsAppointmentProvidorsPanelConstraints);					}				}				providerInGroupInd++;			}			validate();			repaint();		} else if (m.getComponent().getName().startsWith("appointmentCalendar")) {			if (null != appointmentCalendarDayOfWeekJTextField.getText() || appointmentCalendarDayOfWeekJTextField.getText().equals("")) {				rollAndFillCalendar(appointmentsFormCalendar, null, 0, appointmentCalendarDayOfWeekJTextField, appointmentCalendarMonthJTextField, appointmentCalendarDayOfMonthJTextField, appointmentCalendarYearJTextField, appointmentCalendarHourJTextField, appointmentCalendarMinuteJTextField, appointmentCalendarAmPmJTextField);			} else if (m.getComponent().getName().contains("AmPm")) {				if (appointmentCalendarAmPmJTextField.getText().equals("AM")) {					appointmentCalendarAmPmJTextField.setForeground(Color.WHITE);					appointmentCalendarAmPmJTextField.setFont(SystemWindow.systemFont);					appointmentCalendarAmPmJTextField.setText("PM");				} else if (appointmentCalendarAmPmJTextField.getText().equals("PM")) {					appointmentCalendarAmPmJTextField.setForeground(Color.LIGHT_GRAY);					appointmentCalendarAmPmJTextField.setFont(appointmentsAmPmTextFieldFontWhenDisplaying24HourTime);					appointmentCalendarAmPmJTextField.setText("24-hr");				} else {					appointmentCalendarAmPmJTextField.setForeground(Color.WHITE);					appointmentCalendarAmPmJTextField.setFont(SystemWindow.systemFont);					appointmentCalendarAmPmJTextField.setText("AM");				}				syncAppointmentCalendarWithTalkback(((JTextField) m.getSource()));			}		} else if (m.getComponent().getName().equals("appointmentsPaperFormBaseJPanel")) {			Point appointmentsPaperPanelScreenLocation = appointmentsPaperJPanel.getLocationOnScreen();			Rectangle appointmentsPaperPanelScreenRectangle = new Rectangle(appointmentsPaperPanelScreenLocation.x, appointmentsPaperPanelScreenLocation.y, appointmentsPaperPanelScreenLocation.x + appointmentsPaperJPanel.getWidth(), appointmentsPaperPanelScreenLocation.y + appointmentsPaperJPanel.getHeight());			if (!(appointmentsPaperPanelScreenRectangle.contains(m.getLocationOnScreen()))) {				lowerAppointmentsSplitPaneDivider();			}		} else if (m.getComponent().getName().equals("appointmentsAppointmentProvidorsJTextField") || m.getComponent().getName().equals("appointmentsAppointmentProvidorsJLabel") || m.getComponent().getName().equals("appointmentsAppointmentProvidorsJPanel")) {			if (m.getButton() != 1) {				popupProvidorChoicesJPopupMenu("CREATE_GROUP");			} else {				popupProvidorChoicesJPopupMenu("SHOW_PROVIDORS");			}		} else if (m.getComponent().getName().equals("providorNameJLabel")) {			if (m.getButton() != 1) {				int ind = 0;				while (ind < selectedAppointmentProviders.size()) {					if (m.getComponent().getName().equals(selectedAppointmentProviders.elementAt(ind))) {						selectedAppointmentProviders.removeElement(ind);						ind++;					}					ind++;				}			}		}	}	@Override	public void mouseEntered(MouseEvent m) {	}	@Override	public void mouseExited(MouseEvent m) {	}	@Override	public void mousePressed(MouseEvent m) {		super.mousePressed(m);	}	@Override	public void mouseReleased(MouseEvent m) {		super.mouseReleased(m);	}}// EOF